public interface Client
Modifier and Type | Method and Description |
---|---|
Client |
accept(javax.ws.rs.core.MediaType... types)
Set HTTP Accept header
|
Client |
accept(String... types)
Set HTTP Accept header
|
Client |
acceptEncoding(String... encodings)
Set HTTP Accept-Encoding header
|
Client |
acceptLanguage(String... languages)
Set HTTP Accept-Language header
|
Client |
authorization(Object auth)
Set HTTP Authorization header
|
void |
close()
Release the internal state and configuration associated with this client
|
Client |
cookie(javax.ws.rs.core.Cookie cookie)
Set HTTP Cookie header
|
Client |
encoding(String encoding)
Set HTTP Content-Encoding header
|
URI |
getBaseURI()
Get the base URI this Client has been intialized with
|
URI |
getCurrentURI()
Get the current URI this Client is working with
|
javax.ws.rs.core.MultivaluedMap<String,String> |
getHeaders()
Get the copy of request headers
|
javax.ws.rs.core.Response |
getResponse()
Get the response state if any
|
Client |
header(String name,
Object... values)
Set arbitrary HTTP Header
|
Client |
headers(javax.ws.rs.core.MultivaluedMap<String,String> map)
Set HTTP Headers
|
Client |
language(String language)
Set HTTP Content-Language header
|
Client |
match(javax.ws.rs.core.EntityTag tag,
boolean ifNot)
Set HTTP If-Match or If-None-Match header
|
Client |
modified(Date date,
boolean ifNot)
Set HTTP If-Modified-Since or If-Unmodified-Since header
|
Client |
query(String name,
Object... values)
Update the current URI query parameters
|
Client |
reset()
Reset the headers and response state if any
|
Client |
type(javax.ws.rs.core.MediaType ct)
Set HTTP Content-Type header
|
Client |
type(String type)
Set HTTP Content-Type header
|
Client type(javax.ws.rs.core.MediaType ct)
ct
- JAXRS MediaType representing Content-Type valueClient type(String type)
type
- Content-Type valueClient accept(javax.ws.rs.core.MediaType... types)
types
- list of JAXRS MediaTypes representing Accept header valuesClient accept(String... types)
types
- list of Accept header valuesClient language(String language)
language
- Content-Language header valueClient acceptLanguage(String... languages)
languages
- list of Accept-Language header valuesClient encoding(String encoding)
encoding
- Content-Encoding header valueClient acceptEncoding(String... encodings)
encodings
- list of Accept-Encoding header valueClient match(javax.ws.rs.core.EntityTag tag, boolean ifNot)
tag
- ETag valueifNot
- if true then If-None-Match is set, If-Match otherwiseClient modified(Date date, boolean ifNot)
date
- Date value, will be formated as "EEE, dd MMM yyyy HH:mm:ss zzz"ifNot
- if true then If-Unmodified-Since is set, If-Modified-Since otherwiseClient cookie(javax.ws.rs.core.Cookie cookie)
cookie
- Cookie valueClient authorization(Object auth)
auth
- Authorization valueClient query(String name, Object... values)
name
- query namevalues
- query valuesClient header(String name, Object... values)
name
- header namevalues
- list of header valuesClient headers(javax.ws.rs.core.MultivaluedMap<String,String> map)
map
- headersClient reset()
javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
URI getBaseURI()
URI getCurrentURI()
javax.ws.rs.core.Response getResponse()
void close()
Apache CXF