HttpResponse

class aws_cdk.integ_tests_alpha.HttpResponse(*, body=None, headers=None, ok=None, status=None, status_text=None)

Bases: object

(experimental) Response from fetch.

Parameters:
  • body (Optional[Any]) – (experimental) The response, either as parsed JSON or a string literal.

  • headers (Optional[Mapping[str, Any]]) – (experimental) Headers associated with the response.

  • ok (Optional[bool]) – (experimental) Indicates whether the response was successful. status range 200-299

  • status (Union[int, float, None]) – (experimental) Status code of the response.

  • status_text (Optional[str]) – (experimental) The status message corresponding to the status code.

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

# body: Any
# headers: Any

http_response = integ_tests_alpha.HttpResponse(
    body=body,
    headers={
        "headers_key": headers
    },
    ok=False,
    status=123,
    status_text="statusText"
)

Attributes

body

(experimental) The response, either as parsed JSON or a string literal.

Stability:

experimental

headers

(experimental) Headers associated with the response.

Stability:

experimental

ok

(experimental) Indicates whether the response was successful.

status range 200-299

Stability:

experimental

status

(experimental) Status code of the response.

Stability:

experimental

status_text

(experimental) The status message corresponding to the status code.

Stability:

experimental