Uses of Class
org.apache.juneau.rest.client.RestCallException
Packages that use RestCallException
Package
Description
REST Client API
REST Client Assertions
REST Server Mock API
-
Uses of RestCallException in org.apache.juneau.rest.client
Methods in org.apache.juneau.rest.client that throw RestCallExceptionModifier and TypeMethodDescriptionSets the value for theAccept request header.RestRequest.acceptCharset
(String value) Sets the value for theAccept-Charset request header.<T> T
Same asResponseContent.as(Type,Type...)
except optimized for a non-parameterized class.<T> T
Parses HTTP body into the specified object type.<T> T
Same asResponseContent.as(Class)
except allows you to predefine complex data types using theClassMeta
API.ResponseContent.asAbbreviatedString
(int length) Same asResponseContent.asString()
but truncates the string to the specified length.byte[]
ResponseContent.asBytes()
Returns the HTTP response message body as a byte array.<T> Future<T>
Same asResponseContent.as(Class)
but allows you to run the call asynchronously.<T> Future<T>
Same asResponseContent.as(Type,Type...)
but allows you to run the call asynchronously.<T> Future<T>
Same asResponseContent.as(ClassMeta)
but allows you to run the call asynchronously.ResponseContent.asHex()
Returns the HTTP body content as a simple hexadecimal character string.Converts the contents of the response body to a string and then matches the specified pattern against it.Converts the contents of the response body to a string and then matches the specified pattern against it.Converts the contents of the response body to a string and then matches the specified pattern against it.ResponseContent.asObjectRest()
Converts the output from the connection into anJsonMap
and then wraps that in aObjectRest
.ResponseContent.asObjectRest
(Class<?> innerType) Parses the output from the body into the specified type and then wraps that in aObjectRest
.RestResponse.assertCharset()
Provides the ability to perform fluent-style assertions on the response character encoding.ResponseContent.asSpacedHex()
Returns the HTTP body content as a simple space-delimited hexadecimal character string.ResponseContent.asString()
Returns the contents of this body as a string.ResponseContent.asStringFuture()
Same asResponseContent.asString()
but allows you to run the call asynchronously.Performs a REST call where the entire call is specified in a simple string.RestRequest.complete()
Same asRestRequest.run()
but immediately callsRestResponse.consume()
to clean up the response.RestRequest.completeFuture()
Same asRestRequest.complete()
but allows you to run the call asynchronously.RestRequest.contentString
(Object input) Sets the body of this request as straight text bypassing the serializer.RestRequest.contentType
(String value) Sets the value for theContent-Type request header.protected RestRequest
RestClient.createRequest
(URI uri, String method, boolean hasBody) Creates aRestRequest
object from the specifiedHttpRequest
object.protected RestResponse
RestClient.createResponse
(RestRequest request, HttpResponse httpResponse, Parser parser) Creates aRestResponse
object from the specifiedHttpResponse
object.RestRequest.debug()
SetsDebug: value header on this request.Perform aDELETE request against the specified URI.RestRequest.formDataPairs
(String... pairs) Adds form-data parameters to the request body using free-form key/value pairs.Same asRestClient.formPost(Object, Object)
but doesn't specify the input yet.Perform aPOST request with a content type ofapplication/x-www-form-urlencoded against the specified URI.RestClient.formPostPairs
(Object uri, String... parameters) Perform aPOST request with a content type ofapplication/x-www-form-urlencoded against the specified URI.RestClient.get()
Perform aGET request against the root URI.Perform aGET request against the specified URI.RestResponse.getCharacterEncoding()
Shortcut for retrieving the response charset from theContent-Type header.RestResponse.getContentType()
Shortcut for retrieving the response content type from theContent-Type header.<T> T
RestRequest.getResponse
(Class<T> type) A shortcut for callingrun().getContent().as( .type )<T> T
RestRequest.getResponse
(Type type, Type... args) A shortcut for callingrun().getContent().as( .type ,args )RestRequest.getResponseAsString()
A shortcut for callingrun().getContent().asString() .Perform aHEAD request against the specified URI.RestRequest.interceptors
(RestCallInterceptor... interceptors) Add one or more interceptors for this call only.Shortcut for setting theAccept andContent-Type headers on a request.RestRequest.noTrace()
When called,No-Trace: true is added to requests.protected void
RestClient.onCallClose
(RestRequest req, RestResponse res) Interceptor method called immediately after the RestRequest object is created and all headers/query/form-data has been set on the request from the client.protected void
RestClient.onCallConnect
(RestRequest req, RestResponse res) Interceptor method called immediately after an HTTP response has been received.protected void
RestClient.onCallInit
(RestRequest req) Interceptor method called immediately after the RestRequest object is created and all headers/query/form-data has been copied from the client.Perform anOPTIONS request against the specified URI.Same asRestClient.patch(Object, Object)
but don't specify the input yet.Perform aPATCH request against the specified URI.RestClient.patch
(Object uri, String body, ContentType contentType) Perform aPATCH request against the specified URI as a plain text body bypassing the serializer.Same asRestClient.post(Object, Object)
but don't specify the input yet.Perform aPOST request against the specified URI.RestClient.post
(Object uri, String body, ContentType contentType) Perform aPOST request against the specified URI as a plain text body bypassing the serializer.Same asRestClient.put(Object, Object)
but don't specify the input yet.Perform aPUT request against the specified URI.RestClient.put
(Object uri, String body, ContentType contentType) Perform aPUT request against the specified URI using a plain text body bypassing the serializer.RestRequest.queryDataPairs
(String... pairs) Adds query parameters to the URI query using free-form key/value pairs..Perform a generic REST call.Perform a generic REST call.Perform a generic REST call.protected RestRequest
RestClient.request
(RestOperation op) Perform an arbitrary request against the specified URI.RestRequest.run()
Runs this request and returns the resulting response object.RestRequest.runFuture()
Same asRestRequest.run()
but allows you to run the call asynchronously.Sets the URI for this request.Constructors in org.apache.juneau.rest.client that throw RestCallExceptionModifierConstructorDescriptionprotected
RestRequest
(RestClient client, URI uri, String method, boolean hasBody) Constructs a REST call with the specified method name. -
Uses of RestCallException in org.apache.juneau.rest.client.assertion
Methods in org.apache.juneau.rest.client.assertion that throw RestCallExceptionModifier and TypeMethodDescription<T> FluentAnyAssertion<T,
R> Converts the parameter value to a type usingResponseHeader.as(Class)
and then returns the value as an any-object assertion.Converts the parameter value to a type usingResponseHeader.as(Type,Type...)
and then returns the value as an any-object assertion. -
Uses of RestCallException in org.apache.juneau.rest.mock
Methods in org.apache.juneau.rest.mock that throw RestCallExceptionModifier and TypeMethodDescriptionMockRestRequest.acceptCharset
(String value) MockRestRequest.contentString
(Object input) MockRestRequest.contentType
(String value) protected MockRestRequest
MockRestClient.createRequest
(URI uri, String method, boolean hasBody) protected MockRestResponse
MockRestClient.createResponse
(RestRequest req, HttpResponse httpResponse, Parser parser) MockRestRequest.debug()
MockRestRequest.formDataPairs
(String... pairs) MockRestClient.formPostPairs
(Object url, String... parameters) MockRestClient.get()
MockRestRequest.interceptors
(RestCallInterceptor... interceptors) MockRestRequest.noTrace()
MockRestClient.patch
(Object url, String body, ContentType contentType) MockRestClient.post
(Object url, String body, ContentType contentType) MockRestClient.put
(Object url, String body, ContentType contentType) MockRestRequest.queryDataPairs
(String... pairs) MockRestClient.request
(RestOperation op) Constructors in org.apache.juneau.rest.mock that throw RestCallExceptionModifierConstructorDescriptionprotected
MockRestRequest
(RestClient client, URI uri, String method, boolean hasBody) Constructs a REST call with the specified method name.