interface HttpResponse
Language | Type name |
---|---|
.NET | Amazon.CDK.IntegTests.Alpha.HttpResponse |
Go | github.com/aws/aws-cdk-go/awscdkintegtestsalpha/v2#HttpResponse |
Java | software.amazon.awscdk.integtests.alpha.HttpResponse |
Python | aws_cdk.integ_tests_alpha.HttpResponse |
TypeScript (source) | @aws-cdk/integ-tests-alpha 禄 HttpResponse |
Response from fetch.
Example
// 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
Name | Type | Description |
---|---|---|
body? | any | The response, either as parsed JSON or a string literal. |
headers? | { [string]: any } | Headers associated with the response. |
ok? | boolean | Indicates whether the response was successful. |
status? | number | Status code of the response. |
status | string | The status message corresponding to the status code. |
body?
Type:
any
(optional)
The response, either as parsed JSON or a string literal.
headers?
Type:
{ [string]: any }
(optional)
Headers associated with the response.
ok?
Type:
boolean
(optional)
Indicates whether the response was successful.
status range 200-299
status?
Type:
number
(optional)
Status code of the response.
statusText?
Type:
string
(optional)
The status message corresponding to the status code.