Interface HttpRequest

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

@Generated(value="jsii-pacmak/1.106.0 (build e852934)", date="2025-02-17T19:20:39.190Z") @Stability(Experimental) public interface HttpRequest extends software.amazon.jsii.JsiiSerializable
(experimental) Request to the HttpCall resource.

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.*;
 HttpRequest httpRequest = HttpRequest.builder()
         .parameters(HttpRequestParameters.builder()
                 .url("url")
                 // the properties below are optional
                 .fetchOptions(FetchOptions.builder()
                         .body("body")
                         .headers(Map.of(
                                 "headersKey", "headers"))
                         .method("method")
                         .port(123)
                         .build())
                 .build())
         // the properties below are optional
         .flattenResponse("flattenResponse")
         .build();
 
  • Method Details

    • getParameters

      @Stability(Experimental) @NotNull HttpRequestParameters getParameters()
      (experimental) Parameters from the custom resource.
    • getFlattenResponse

      @Stability(Experimental) @Nullable default String getFlattenResponse()
      (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'

    • builder

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