public static interface ResponseTransformation.Builder<T> extends Buildable<ResponseTransformation<T>>
| Modifier and Type | Method and Description |
|---|---|
ResponseTransformation.Builder<T> |
badRequest(Function<Response,? extends T> f)
Register a function to transform 'bad request' (400) HTTP responses.
|
ResponseTransformation.Builder<T> |
clientError(Function<Response,? extends T> f)
Register a function to transform 'client error' (4xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
conflict(Function<Response,? extends T> f)
Register a function to transform 'conflict' (409) HTTP responses.
|
ResponseTransformation.Builder<T> |
created(Function<Response,? extends T> f)
Register a function to transform 'created' (201) HTTP responses.
|
ResponseTransformation.Builder<T> |
done(Function<Response,T> f)
Register a function to transform all completed (1xx, 2xx, 3xx, 4xx, and 5xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
error(Function<Response,? extends T> f)
Register a function to transform all error (4xx and 5xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
fail(Function<Throwable,? extends T> f)
Register a function to transform exceptions thrown while executing the HTTP request.
|
ResponseTransformation.Builder<T> |
forbidden(Function<Response,? extends T> f)
Register a function to transform 'forbidden' (403) HTTP responses.
|
ResponseTransformation.Builder<T> |
informational(Function<Response,? extends T> f)
Register a function to transform 'informational' (1xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
internalServerError(Function<Response,? extends T> f)
Register a function to transform 'internal server error' (500) HTTP responses.
|
ResponseTransformation.Builder<T> |
noContent(Function<Response,? extends T> f)
Register a function to transform 'no content' (204) HTTP responses.
|
ResponseTransformation.Builder<T> |
notFound(Function<Response,? extends T> f)
Register a function to transform 'not found' (404) HTTP responses.
|
ResponseTransformation.Builder<T> |
notModified(Function<Response,? extends T> f)
Register a function to transform 'not modified' (304) HTTP responses.
|
ResponseTransformation.Builder<T> |
notSuccessful(Function<Response,? extends T> f)
Register a function to transform all non-'successful' (1xx, 3xx, 4xx, 5xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
ok(Function<Response,? extends T> f)
Register a function to transform 'ok' (200) HTTP responses.
|
ResponseTransformation.Builder<T> |
on(HttpStatus status,
Function<Response,? extends T> f)
Register a function to transform HTTP responses with a specific status.
|
ResponseTransformation.Builder<T> |
on(int statusCode,
Function<Response,? extends T> f)
Register a function to transform HTTP responses with a specific status code.
|
ResponseTransformation.Builder<T> |
others(Function<Response,? extends T> f)
Register a function to transform all other HTTP responses (i.e.
|
ResponseTransformation.Builder<T> |
otherwise(Function<Throwable,T> f)
Register a function to transform both of the following events:
Any value passed to
fail()
Any value passed to others(), converted into an exception
|
ResponseTransformation.Builder<T> |
redirection(Function<Response,? extends T> f)
Register a function to transform 'redirection' (3xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
seeOther(Function<Response,? extends T> f)
Register a function to transform 'see other' (303) HTTP responses.
|
ResponseTransformation.Builder<T> |
serverError(Function<Response,? extends T> f)
Register a function to transform 'server error' (5xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
serviceUnavailable(Function<Response,? extends T> f)
Register a function to transform 'service unavailable' (503) HTTP responses.
|
ResponseTransformation.Builder<T> |
successful(Function<Response,? extends T> f)
Register a function to transform 'successful' (2xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
unauthorized(Function<Response,? extends T> f)
Register a function to transform 'unauthorized' (401) HTTP responses.
|
ResponseTransformation.Builder<T> on(HttpStatus status, Function<Response,? extends T> f)
status - The HTTP status to select onf - The transformation functionon(int, Function)ResponseTransformation.Builder<T> on(int statusCode, Function<Response,? extends T> f)
Register a function to transform HTTP responses with a specific status code. Use this as a fallback if the status code you're interested in does not have a more explicit registration method for it.
Prefer the on(HttpStatus, Function) method if you're using standard
HTTP status.
statusCode - The code to select onf - The transformation functionon(HttpStatus, Function)ResponseTransformation.Builder<T> informational(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> successful(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> ok(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> created(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> noContent(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> redirection(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> seeOther(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> notModified(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> clientError(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> badRequest(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> unauthorized(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> forbidden(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> notFound(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> conflict(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> serverError(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> internalServerError(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> serviceUnavailable(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> error(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> notSuccessful(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> others(Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> otherwise(Function<Throwable,T> f)
fail()f - The transformation functionResponseTransformation.Builder<T> done(Function<Response,T> f)
f - The transformation functionResponseTransformation.Builder<T> fail(Function<Throwable,? extends T> f)
f - The transformation functionCopyright © 2012–2020 Atlassian. All rights reserved.