Interface FetchOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
FetchOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-24T10:56:41.765Z") @Stability(Experimental) public interface FetchOptions extends software.amazon.jsii.JsiiSerializable
(experimental) Options to pass to the JavaScript fetch api.

Example:

 // 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.*;
 FetchOptions fetchOptions = FetchOptions.builder()
         .body("body")
         .headers(Map.of(
                 "headersKey", "headers"))
         .method("method")
         .port(123)
         .build();
 
  • Method Details

    • getBody

      @Stability(Experimental) @Nullable default String getBody()
      (experimental) Request body.

      Default: - no body

    • getHeaders

      @Stability(Experimental) @Nullable default Map<String,String> getHeaders()
      (experimental) Optional request headers.

      Default: no headers

    • getMethod

      @Stability(Experimental) @Nullable default String getMethod()
      (experimental) HTTP method.

      Default: GET

    • getPort

      @Stability(Experimental) @Nullable default Number getPort()
      (experimental) Optional port.

      Default: default port for protocol

    • builder

      @Stability(Experimental) static FetchOptions.Builder builder()
      Returns:
      a FetchOptions.Builder of FetchOptions