Skip to content
v2.275.0

Experimental

@aws-cdk/integ-tests-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

HttpResponse Struct ​

Response from fetch.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as integ_tests_alpha from '@aws-cdk/integ-tests-alpha';

declare const body: any;
declare const headers: any;
const httpResponse: integ_tests_alpha.HttpResponse = {
  body: body,
  headers: {
    headersKey: headers,
  },
  ok: false,
  status: 123,
  statusText: 'statusText',
};

Properties ​

bodyoptionalanybodyoptionalAnybodyoptionalObjectBodyoptionalobjectBodyoptionalinterface{}#
The response, either as parsed JSON or a string literal.
headersoptional{ [key: string]: any }headersoptionaltyping.Mapping[str, Any]headersoptionalMap<String, Object>HeadersoptionalIDictionary<string, object>Headersoptional*map[string]interface{}#
Headers associated with the response.
okoptionalbooleanokoptionalboolokoptionalBooleanOkoptionalboolOkoptional*bool#
Indicates whether the response was successful.

status range 200-299

statusoptionalnumberstatusoptionalint | floatstatusoptionalNumberStatusoptionaldoubleStatusoptional*float64#
Status code of the response.
statusTextoptionalstringstatus_textoptionalstrstatusTextoptionalStringStatusTextoptionalstringStatusTextoptional*string#
The status message corresponding to the status code.