public class ClientRequest
extends org.jboss.resteasy.client.ClientRequest
ClientRequest
class in order to provide a
ClientExecutor
and ResteasyProviderFactory
without requiring clients to pass them in.
Additionally, this class overrides the various http methods (post, get, put) in order to implement
some error handling. These methods will throw an appropriate exception now (when possible), rather
than a less meaningful RESTEasy generic exception. When communicating with the JBoss s-ramp
implementation, this error handling should work well (it should throw an exception that also includes
the server-side root-cause stack trace). When connecting to some other s-ramp implementation, your
mileage may vary.attributes, body, bodyAnnotations, bodyContentType, bodyGenericType, bodyType, executor, finalUri, followRedirects, formParameters, headers, httpMethod, linkHeader, matrixParameters, pathParameterList, pathParameters, queryParameters, uri
Constructor and Description |
---|
ClientRequest(String uriTemplate)
Constructor.
|
ClientRequest(String uriTemplate,
org.jboss.resteasy.client.ClientExecutor clientExecutor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.jboss.resteasy.client.ClientResponse |
delete() |
<T> org.jboss.resteasy.client.ClientResponse<T> |
delete(Class<T> returnType) |
org.jboss.resteasy.client.ClientResponse |
get() |
<T> org.jboss.resteasy.client.ClientResponse<T> |
get(Class<T> returnType) |
org.jboss.resteasy.client.ClientResponse |
post() |
<T> org.jboss.resteasy.client.ClientResponse<T> |
post(Class<T> returnType) |
org.jboss.resteasy.client.ClientResponse |
put() |
<T> org.jboss.resteasy.client.ClientResponse<T> |
put(Class<T> returnType) |
accept, accept, addLink, addLink, body, body, body, body, body, clear, cookie, cookie, create, createSubsequentRequest, delete, delete, execute, followRedirects, followRedirects, formParameter, get, get, getAttributes, getBody, getBodyAnnotations, getBodyContentType, getBodyGenericType, getBodyType, getDefaultExecutor, getExecutor, getFormParameters, getHeaders, getHeadersAsObjects, getHttpMethod, getMatrixParameters, getPathParameterList, getPathParameters, getProviderFactory, getQueryParameters, getTarget, getUri, head, header, httpMethod, httpMethod, httpMethod, httpMethod, matrixParameter, options, options, options, options, overrideUri, pathParameter, pathParameters, post, post, postTarget, put, put, queryParameter, setDefaultExecutorClass, setHttpMethod, toHeaderString, toString, writeRequestBody
copyClientInterceptorsTo, getExecutionInterceptorList, getExecutionInterceptors, getInterceptors, getInterceptors, getReaderInterceptorList, getReaderInterceptors, getWriterInterceptorList, getWriterInterceptors, prefixClientInterceptorsTo, registerInterceptor, setExecutionInterceptors, setExecutionInterceptors, setReaderInterceptors, setReaderInterceptors, setWriterInterceptors, setWriterInterceptors
public ClientRequest(String uriTemplate)
uriTemplate
- public ClientRequest(String uriTemplate, org.jboss.resteasy.client.ClientExecutor clientExecutor)
uriTemplate
- clientExecutor
- public <T> org.jboss.resteasy.client.ClientResponse<T> post(Class<T> returnType) throws Exception
post
in class org.jboss.resteasy.client.ClientRequest
Exception
ClientRequest.post(Class)
public org.jboss.resteasy.client.ClientResponse post() throws Exception
post
in class org.jboss.resteasy.client.ClientRequest
Exception
ClientRequest.post()
public <T> org.jboss.resteasy.client.ClientResponse<T> get(Class<T> returnType) throws Exception
get
in class org.jboss.resteasy.client.ClientRequest
Exception
ClientRequest.get(Class)
public org.jboss.resteasy.client.ClientResponse get() throws Exception
get
in class org.jboss.resteasy.client.ClientRequest
Exception
ClientRequest.get()
public <T> org.jboss.resteasy.client.ClientResponse<T> put(Class<T> returnType) throws Exception
put
in class org.jboss.resteasy.client.ClientRequest
Exception
ClientRequest.put(Class)
public org.jboss.resteasy.client.ClientResponse put() throws Exception
put
in class org.jboss.resteasy.client.ClientRequest
Exception
ClientRequest.put()
public <T> org.jboss.resteasy.client.ClientResponse<T> delete(Class<T> returnType) throws Exception
delete
in class org.jboss.resteasy.client.ClientRequest
Exception
ClientRequest.delete(Class)
Copyright © 2011–2015 JBoss, a division of Red Hat. All rights reserved.