> **Experimental**
>
> `@aws-cdk/integ-tests-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# HttpResponse

Response from fetch.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/assertions/providers/lambda-handler/types.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/integ-tests-alpha/lib/assertions/providers/lambda-handler/types.ts#L92)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as integ_tests_alpha from '@aws-cdk/integ-tests-alpha';

declare const body: any;
declare const headers: any;
const httpResponse: integ_tests_alpha.HttpResponse = {
  body: body,
  headers: {
    headersKey: headers,
  },
  ok: false,
  status: 123,
  statusText: 'statusText',
};
```

Python:

```python
# 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"
)
```

Java:

```java
// 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();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.IntegTests.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.IntegTests.Alpha;

var body;
var headers;

var httpResponse = new HttpResponse {
    Body = body,
    Headers = new Dictionary<string, object> {
        { "headersKey", headers }
    },
    Ok = false,
    Status = 123,
    StatusText = "statusText"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkintegtestsalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import integ_tests_alpha "github.com/aws/aws-cdk-go/awscdkintegtestsalpha"

var body interface{}
var headers interface{}

httpResponse := &HttpResponse{
	Body: body,
	Headers: map[string]interface{}{
		"headersKey": headers,
	},
	Ok: jsii.Boolean(false),
	Status: jsii.Number(123),
	StatusText: jsii.String("statusText"),
}
```

## Properties

- `body`: any — The response, either as parsed JSON or a string literal.

- `headers`: { [key: string]: any } — Headers associated with the response.

- `ok`: boolean — Indicates whether the response was successful.

  status range 200-299

- `status`: number — Status code of the response.

- `statusText`: string — The status message corresponding to the status code.
