Interface HttpResponse
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
HttpResponse.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:51.042Z")
@Stability(Experimental)
public interface HttpResponse
extends software.amazon.jsii.JsiiSerializable
(experimental) Response from fetch.
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.*;
Object body;
Object headers;
HttpResponse httpResponse = HttpResponse.builder()
.body(body)
.headers(Map.of(
"headersKey", headers))
.ok(false)
.status(123)
.statusText("statusText")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forHttpResponsestatic final classAn implementation forHttpResponse -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpResponse.Builderbuilder()default ObjectgetBody()(experimental) The response, either as parsed JSON or a string literal.(experimental) Headers associated with the response.default BooleangetOk()(experimental) Indicates whether the response was successful.default Number(experimental) Status code of the response.default String(experimental) The status message corresponding to the status code.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBody
(experimental) The response, either as parsed JSON or a string literal. -
getHeaders
(experimental) Headers associated with the response. -
getOk
(experimental) Indicates whether the response was successful.status range 200-299
-
getStatus
(experimental) Status code of the response. -
getStatusText
(experimental) The status message corresponding to the status code. -
builder
- Returns:
- a
HttpResponse.BuilderofHttpResponse
-