---
title: Requests and responses
description: An HTTP request message. Access the content of the request by using expressions.
component: pinggateway
version: 2023.11
page_id: pinggateway:reference:RequestsResponses
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/RequestsResponses.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2023-06-27T16:40:32Z
superseded_by: https://docs.pingidentity.com/pinggateway/2026/reference/RequestsResponses.html
section_ids:
  Request: Request
  Request-properties: Properties
  Request-moreinfo: More information
  Response: Response
  Response-properties: Properties
  Response-moreinfo: More information
  Status: Status
  Status-properties: Properties
  Status-moreinfo: More information
  URI: URI
  URI-properties: Properties
  URI-moreinfo: More information
---

# Requests and responses

## Request

An HTTP request message. Access the content of the request by using [expressions](Expressions.html#expressions-syntax).

### Properties

* `"method"`: *[java.lang.String](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html)*

  The HTTP method; for example, `GET`.

* `"uri"`: *[java.net.URI](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/URI.html)*

  The fully-qualified URI of the resource being accessed; for example, `http://www.example.com/resource.txt`.

* `"version"`: *[java.lang.String](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html)*

  The protocol version used for the request; for example, `HTTP/2`.

* `"headers"`: *[org.forgerock.http.protocol.Headers](../_attachments/apidocs/org/forgerock/http/protocol/Headers.html)*

  One or more headers in the request, with the format `header_name: [ header_value, …​ ]`. The following example accesses the first value of the request header `UserId`:

  ```none
  pass:[${request.headers['UserId'][0]}
  ```

* `"cookies"`: *[org.forgerock.http.protocol.RequestCookies](../_attachments/apidocs/org/forgerock/http/protocol/RequestCookies.html)*

  Incoming request cookies, with the format `cookie_name: [ cookie_value, …​ ]`. The following example accesses the first value of the request cookie `my-jwt`:

  ```none
  pass:[${request.cookies['my-jwt'][0].value}
  ```

* `"entity"`: *[Entity](../_attachments/apidocs/org/forgerock/http/protocol/Entity.html)*

  The message body. The following example accesses the subject token from the request entity:

  ```none
  pass:[#{request.entity.form['subject_token'][0]}]
  ```

* `"queryParams"`: *[Form](../_attachments/apidocs/org/forgerock/http/protocol/Form.html)*

  Returns a copy of the query parameters decoded as a form. Modifications to the returned form are not reflected in the request.

### More information

[org.forgerock.http.protocol.Request](../_attachments/apidocs/org/forgerock/http/protocol/Request.html)

## Response

An HTTP response message. Access the content of the response by using [expressions](Expressions.html#expressions-syntax).

### Properties

* `"cause"`: *[java.lang.Exception](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html)*

  The cause of an error if the status code is in the range 4xx-5xx. Possibly null.

* `"status"`: *[Status](../_attachments/apidocs/org/forgerock/http/protocol/Status.html)*

  The response status.

* `"version"`: *[java.lang.String](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html)*

  The protocol version used the response; for example, `HTTP/2`.

* `"headers"`: *[org.forgerock.http.protocol.Headers](../_attachments/apidocs/org/forgerock/http/protocol/Headers.html)*

  One or more headers in the response. The following example accesses the first value of the response header `Content-Type`:

  ```none
  pass:[${response.headers['Content-Type'][0]}]
  ```

* `"trailers"`: *[org.forgerock.http.protocol.Headers](../_attachments/apidocs/org/forgerock/http/protocol/Headers.html)*

  One or more trailers in the response. The following example accesses the first value of the response trailer `Content-Length`:

  ```none
  pass:[${response.trailers['Content-Length'][0]}]
  ```

* `"entity"`: *[Entity](../_attachments/apidocs/org/forgerock/http/protocol/Entity.html)*

  The message entity body. The following example accesses the user ID from the response:

  ```none
  pass:[#{toString(response.entity.json['userId'])}]
  ```

### More information

[org.forgerock.http.protocol.Response](../_attachments/apidocs/org/forgerock/http/protocol/Response.html)

## Status

An HTTP response status.

### Properties

* `"code"`: *integer*

  Three-digit integer reflecting the HTTP status code.

* `"family"`: *[enumeration](preface.html#definition-enumeration)*

  Family Enum value representing the class of response that corresponds to the code:

  * `Family.INFORMATIONAL`

    Status code reflects a provisional, informational response: 1xx.

  * `Family.SUCCESSFUL`

    The server received, understood, accepted and processed the request successfully. Status code: 2xx.

  * `Family.REDIRECTION`

    Status code indicates that the client must take additional action to complete the request: 3xx.

  * `Family.CLIENT_ERROR`

    Status code reflects a client error: 4xx.

  * `Family.SERVER_ERROR`

    Status code indicates a server-side error: 5xx.

  * `Family.UNKNOWN`

    Status code does not belong to one of the known families: 600+.

* `"reasonPhrase"`: *[string](preface.html#definition-string)*

  The human-readable reason-phrase corresponding to the status code.

* `"isClientError"`: *[boolean](preface.html#definition-boolean)*

  True if Family.CLIENT_ERROR.

* `"isInformational"`: *[boolean](preface.html#definition-boolean)*

  True if Family.INFORMATIONAL.

* `"isRedirection"`: *[boolean](preface.html#definition-boolean)*

  True if Family.REDIRECTION.

* `"isServerError"`: *[boolean](preface.html#definition-boolean)*

  True if Family.SERVER_ERROR.

* `"isSuccessful"`: *[boolean](preface.html#definition-boolean)*

  True if Family.SUCCESSFUL.

### More information

[Response Status Codes](https://datatracker.ietf.org/doc/html/rfc7231#section-6).

[org.forgerock.http.protocol.Status](../_attachments/apidocs/org/forgerock/http/protocol/Status.html)

## URI

Represents a Uniform Resource Identifier (URI) reference.

### Properties

* `"scheme"`: *[string](preface.html#definition-string)*

  The scheme component of the URI, or `null` if the scheme is undefined.

* `"authority"`: *[string](preface.html#definition-string)*

  The decoded authority component of the URI, or `null` if the authority is undefined.

  Use "rawAuthority" to access the raw (encoded) component.

* `"userInfo"`: *[string](preface.html#definition-string)*

  The decoded user-information component of the URI, or `null` if the user information is undefined.

  Use "rawUserInfo" to access the raw (encoded) component.

* `"host"`: *[string](preface.html#definition-string)*

  The host component of the URI, or `null` if the host is undefined.

* `"port"`: *[number](preface.html#definition-number)*

  The port component of the URI, or `null` if the port is undefined.

* `"path"`: *[string](preface.html#definition-string)*

  The decoded path component of the URI, or `null` if the path is undefined.

  Use "rawPath" to access the raw (encoded) component.

* `"query"`: *[string](preface.html#definition-string)*

  The decoded query component of the URI, or `null` if the query is undefined.

  |   |                                                                                                                                                                                         |
  | - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  |   | The query key and value is decoded. However, because a query value can be encoded more than once in a redirect chain, even though it is decoded it can contain unsafe ASCII characters. |

  Use "rawQuery" to access the raw (encoded) component.

* `"fragment"`: *[string](preface.html#definition-string)*

  The decoded fragment component of the URI, or `null` if the fragment is undefined.

  Use "rawFragment" to access the raw (encoded) component.

### More information

[org.forgerock.http.MutableUri](../_attachments/apidocs/org/forgerock/http/MutableUri.html)
