RequestResponse

data class RequestResponse(    val tags: List<String>,     val requestUri: NonSensitiveUri,     val requestUriIsRegex: Boolean? = null,     val requestHeaders: List<Header>,     val protocolVersion: String,     val method: String,     val comment: String? = null,     val testIdentifiers: List<String>,     val responseInitialDurationMs: Long,     val responseTotalDurationMs: Long? = null,     val responseStatusCode: Int,     val responseStatusDescription: String,     val responseHeaders: List<Header>,     val responseContent: String? = null)

Request and response representation suitable for serialization to JSON.

Nullable properties are used to limit the verbosity of the JSON formatted data.

Parameters

tags

List of strings. Use "NO_UPDATE" to exclude this entry from being updated during merges. Tags can also be used to refer to a request-response from tests.

requestUri

The request URI

requestUriIsRegex

Can be set manually to true when requestUri contains a regular expression. That should be used for matching against capture records against during merges or when matching records while replaying a request-response.

requestHeaders

The request headers. See Header for manually setting up regular expressions.

protocolVersion

The HTTP protocol version of the request.

method

The HTTP method of the request.

comment

Can be set manually to add a comment to an request-response entry.

testIdentifiers

List of test identifiers. Allows you to refer back to the tests that triggered this request-response entry.

responseInitialDurationMs

The initial duration between requesting the response from the forward server and receiving the initial response back. The initial response from the service is the status code, status description and response headers.

responseTotalDurationMs

The total duration between requesting a response from the forward server and receiving the complete response back.

responseStatusCode

The response status code.

responseStatusDescription

The response status description.

responseHeaders

The response headers. Dynamic headers such as 'Date' and 'Expires' are converted to Header instances with Header.dynamicHeader set.

responseContent

Optional the response content. Base64 URL encoded. (This is not an byte array as byte arrays are very verbose when formatted to JSON.)

Constructors

Link copied to clipboard
fun RequestResponse(    tags: List<String>,     requestUri: NonSensitiveUri,     requestUriIsRegex: Boolean? = null,     requestHeaders: List<Header>,     protocolVersion: String,     method: String,     comment: String? = null,     testIdentifiers: List<String>,     responseInitialDurationMs: Long,     responseTotalDurationMs: Long? = null,     responseStatusCode: Int,     responseStatusDescription: String,     responseHeaders: List<Header>,     responseContent: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val comment: String? = null
Link copied to clipboard
val method: String
Link copied to clipboard
val protocolVersion: String
Link copied to clipboard
val requestHeaders: List<Header>
Link copied to clipboard
val requestUri: NonSensitiveUri
Link copied to clipboard
val requestUriIsRegex: Boolean? = null
Link copied to clipboard
val responseContent: String? = null
Link copied to clipboard
val responseHeaders: List<Header>
Link copied to clipboard
val responseInitialDurationMs: Long
Link copied to clipboard
val responseStatusCode: Int
Link copied to clipboard
val responseStatusDescription: String
Link copied to clipboard
val responseTotalDurationMs: Long? = null
Link copied to clipboard
val tags: List<String>
Link copied to clipboard
val testIdentifiers: List<String>