Methods
body
-
Returns T | null
bodyAsBuffer
- bodyAsBuffer(): Buffer | null
-
Returns Buffer | null
bodyAsJson
- bodyAsJson<R>(type: any): R | null
-
Type parameters
Parameters
Returns R | null
bodyAsJsonArray
- bodyAsJsonArray(): any[] | null
-
Returns any[] | null
bodyAsJsonObject
- bodyAsJsonObject(): {} | null
-
Returns {} | null
bodyAsString
- bodyAsString(): string | null
- bodyAsString(encoding: string): string | null
-
Returns string | null
-
Parameters
Returns string | null
cookies
-
Returns string
followedRedirects
- followedRedirects(): string
-
Returns string
getHeader
- getHeader(headerName: string): string | null
-
Parameters
Returns string | null
getTrailer
- getTrailer(trailerName: string): string | null
-
Parameters
Returns string | null
headers
-
Returns MultiMap
statusCode
-
Returns number
statusMessage
-
Returns string
trailers
-
Returns MultiMap
version
-
Returns HttpVersion
An HTTP response.
The usual HTTP response attributes are available:
The body of the response is returned by {@link HttpResponse#body} decoded as the format specified by the {@link BodyCodec} that built the response.
Keep in mind that using this
HttpResponse
impose to fully buffer the response body and should be used for payload that can fit in memory.