# DurableHttpResponse

Package: [Microsoft.Orleans.Durable.Http](/orleans/docs/api/csharp/microsoft.orleans.durable.http/) 10.0.0-alpha.1

[Source](https://github.com/dotnet/orleans/blob/4e887e9c914a2f2647fb3c81de963511521dd9cb/src/Orleans.Durable.Http/DurableHttpResponse.cs#L19)

```csharp
[Orleans.GenerateSerializer]
[Orleans.Immutable]
[Orleans.Alias(Orleans.Durable.Http.DurableHttpResponse)]
public record DurableHttpResponse : IEquatable<DurableHttpResponse>
```

Records an HTTP response which a durable task received: its status code, headers, and content.

## Remarks

The task records the response, so replays read it without sending the request again. It suits API responses, up to [DurableHttpClientOptions](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpclientoptions/); stream large content within a step of the task instead. The record omits `Set-Cookie` headers, which carry the server's credentials for the client.

## Constructors

- [DurableHttpResponse(HttpStatusCode, Uri?, IReadOnlyDictionary&lt;string, string[]&gt;, ReadOnlyMemory&lt;byte&gt;)](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/constructors/constructor-system-net-httpstatuscode-system-uri-nullable-system-collections-gen-e04a4558/)

## Properties

- [Content](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/properties/content-54fae11e/)
- [Headers](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/properties/headers-08da952b/)
- [IsSuccessStatusCode](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/properties/issuccessstatuscode-dbebc26e/)
- [RequestUri](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/properties/requesturi-8a653d76/)
- [StatusCode](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/properties/statuscode-c4f8f044/)

## Methods

- [EnsureSuccessStatusCode](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/methods/ensuresuccessstatuscode-dc2a913b/)
- [GetHeader(string)](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/methods/getheader-string-4c3657bc/)
- [ReadAsString](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/methods/readasstring-786cbdef/)
- [ReadFromJson(JsonSerializerOptions?)](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpresponse/methods/readfromjson-1-system-text-json-jsonserializeroptions-nullable-582d3669/)
