HttpRequest
- class aws_cdk.integ_tests_alpha.HttpRequest(*, parameters, flatten_response=None)
Bases:
object
(experimental) Request to the HttpCall resource.
- Parameters:
parameters (
Union
[HttpRequestParameters
,Dict
[str
,Any
]]) – (experimental) Parameters from the custom resource.flatten_response (
Optional
[str
]) – (experimental) Whether or not to flatten the response from the HTTP request. Valid values are ‘true’ or ‘false’ as strings Typically when using an HttpRequest you will be passing it as theactual
value to an assertion provider so this would be set to ‘false’ (you want the actual response). If you are using the HttpRequest to perform more of a query to return a single value to use, then this should be set to ‘true’. Default: ‘false’
- Stability:
experimental
- ExampleMetadata:
fixture=_generated
Example:
# 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 http_request = integ_tests_alpha.HttpRequest( parameters=integ_tests_alpha.HttpRequestParameters( url="url", # the properties below are optional fetch_options=integ_tests_alpha.FetchOptions( body="body", headers={ "headers_key": "headers" }, method="method", port=123 ) ), # the properties below are optional flatten_response="flattenResponse" )
Attributes
- flatten_response
(experimental) Whether or not to flatten the response from the HTTP request.
Valid values are ‘true’ or ‘false’ as strings
Typically when using an HttpRequest you will be passing it as the
actual
value to an assertion provider so this would be set to ‘false’ (you want the actual response).If you are using the HttpRequest to perform more of a query to return a single value to use, then this should be set to ‘true’.
- Default:
‘false’
- Stability:
experimental
- parameters
(experimental) Parameters from the custom resource.
- Stability:
experimental