| Package | Description |
|---|---|
| com.pingidentity.pa.sdk.http | |
| com.pingidentity.pa.sdk.util |
| Modifier and Type | Method and Description |
|---|---|
static ResponseBuilder |
ResponseBuilder.badRequest()
Creates a
ResponseBuilder with a "400 Bad Request" status. |
static ResponseBuilder |
ResponseBuilder.badRequestJson(String json)
Creates a
ResponseBuilder with a "400 Bad Request" status, a Content-Type of
"application/json;charset=utf-8", and the provided body content. |
ResponseBuilder |
ResponseBuilder.body(byte[] body)
Sets the
Response body with the provided message using UTF-8 encoding and updating the Content-Length
header appropriately. |
default ResponseBuilder |
ResponseBuilder.body(String msg)
Sets the
Response body with the provided message using UTF-8 encoding and updating the Content-Length
header appropriately. |
ResponseBuilder |
ResponseBuilder.body(String msg,
Charset charset)
|
ResponseBuilder |
ResponseBuilder.contentType(MediaType type)
Sets the Content-Type header field on the
Response. |
ResponseBuilder |
ResponseBuilder.contentType(String type)
Sets the Content-Type header field on the
Response. |
static ResponseBuilder |
ResponseBuilder.forbidden()
Creates a
ResponseBuilder with a "403 Forbidden" status. |
static ResponseBuilder |
ResponseBuilder.found(String url)
Creates a
ResponseBuilder with a "302 Found" status. |
ResponseBuilder |
ResponseBuilder.header(HeaderField headerField)
|
ResponseBuilder |
ResponseBuilder.header(String headerName,
String headerValue)
Adds a
HeaderField to the Response. |
ResponseBuilder |
ResponseBuilder.headers(Headers headers)
|
static ResponseBuilder |
ResponseBuilder.internalServerError()
Creates a
ResponseBuilder with a "500 Internal Server Error" status. |
static ResponseBuilder |
ResponseBuilder.newInstance(HttpStatus status)
Creates a ResponseBuilder.
|
static ResponseBuilder |
ResponseBuilder.notFound()
Creates a
ResponseBuilder with a "404 Not Found" status and a Content Type of "text/html;charset=UTF-8". |
static ResponseBuilder |
ResponseBuilder.notFoundJson()
Creates a
ResponseBuilder with a "404 Not Found" status and a content type of
"application/json;charset=UTF-8". |
static ResponseBuilder |
ResponseBuilder.ok()
Creates a
ResponseBuilder with a "200 OK" status. |
static ResponseBuilder |
ResponseBuilder.ok(String msg)
Creates a
ResponseBuilder with a "200 OK" status, a Content-Type of
"text/html;charset=UTF-8", and the provided string message as the Response body |
static ResponseBuilder |
ResponseBuilder.serviceUnavailable()
Creates a
ResponseBuilder with a "503 Service Unavailable" status. |
static ResponseBuilder |
ResponseBuilder.unauthorized()
Creates a
ResponseBuilder with a "401 Unauthorized" status. |
static ResponseBuilder |
ResponseBuilder.unprocessableEntity()
Creates a
ResponseBuilder with a "422 Unprocessable Entity" status. |
| Modifier and Type | Method and Description |
|---|---|
Response |
TemplateRenderer.renderResponse(Exchange exc,
Map<String,String> context,
String templateName,
ResponseBuilder builder)
Renders a template and produces a
Response |
Copyright 2023 Ping Identity Corp. All rights reserved.