Experimental
@aws-cdk/integ-tests-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
HttpResponseWrapper Struct
Response from the HttpCall resource.
| Stability | Experimental |
|---|---|
| Source | lib/assertions/providers/lambda-handler/types.ts |
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 httpResponseWrapper: integ_tests_alpha.HttpResponseWrapper = {
apiCallResponse: {
body: body,
headers: {
headersKey: headers,
},
ok: false,
status: 123,
statusText: 'statusText',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.integ_tests_alpha as integ_tests_alpha
# body: Any
# headers: Any
http_response_wrapper = integ_tests_alpha.HttpResponseWrapper(
api_call_response=integ_tests_alpha.HttpResponse(
body=body,
headers={
"headers_key": headers
},
ok=False,
status=123,
status_text="statusText"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.integtests.alpha.*;
Object body;
Object headers;
HttpResponseWrapper httpResponseWrapper = HttpResponseWrapper.builder()
.apiCallResponse(HttpResponse.builder()
.body(body)
.headers(Map.of(
"headersKey", headers))
.ok(false)
.status(123)
.statusText("statusText")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.IntegTests.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.IntegTests.Alpha;
var body;
var headers;
var httpResponseWrapper = new HttpResponseWrapper {
ApiCallResponse = new HttpResponse {
Body = body,
Headers = new Dictionary<string, object> {
{ "headersKey", headers }
},
Ok = false,
Status = 123,
StatusText = "statusText"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdkintegtestsalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import integ_tests_alpha "github.com/aws/aws-cdk-go/awscdkintegtestsalpha"
var body interface{}
var headers interface{}
httpResponseWrapper := &HttpResponseWrapper{
ApiCallResponse: &HttpResponse{
Body: body,
Headers: map[string]interface{}{
"headersKey": headers,
},
Ok: jsii.Boolean(false),
Status: jsii.Number(123),
StatusText: jsii.String("statusText"),
},
}
Properties
apiCallResponseHttpResponseapi_call_responseHttpResponseapiCallResponseHttpResponseApiCallResponseHttpResponseApiCallResponseHttpResponse required #The Response from the fetch request.