FetchOptions

class aws_cdk.integ_tests_alpha.FetchOptions(*, body=None, headers=None, method=None, port=None)

Bases: object

(experimental) Options to pass to the JavaScript fetch api.

Parameters:
  • body (Optional[str]) – (experimental) Request body. Default: - no body

  • headers (Optional[Mapping[str, str]]) – (experimental) Optional request headers. Default: no headers

  • method (Optional[str]) – (experimental) HTTP method. Default: GET

  • port (Union[int, float, None]) – (experimental) Optional port. Default: default port for protocol

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

fetch_options = integ_tests_alpha.FetchOptions(
    body="body",
    headers={
        "headers_key": "headers"
    },
    method="method",
    port=123
)

Attributes

body

(experimental) Request body.

Default:
  • no body

Stability:

experimental

headers

(experimental) Optional request headers.

Default:

no headers

Stability:

experimental

method

(experimental) HTTP method.

Default:

GET

Stability:

experimental

port

(experimental) Optional port.

Default:

default port for protocol

Stability:

experimental