---
title: "Request class"
canonical: https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Request
---

# Request class

An HTTP request whose whole body is in memory before the handler runs. It is the usual parameter of an [`HttpHandlerAttribute`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/HttpHandlerAttribute) method.

```csharp
public sealed class Request : RequestHead
```

## Public Members

| name                                                                                        | description                                                                        |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [Body](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Request/Body) { get; } | The request body as the bytes the client sent; empty when the request has no body. |

## Remarks

Isoplane creates the request and passes it to the handler; an application does not construct one. The method, path, query, headers and cancellation token are inherited from [`RequestHead`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/RequestHead).

To accept an upload too large to hold in memory, declare the handler's parameter as a [`StreamingRequest`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/StreamingRequest) instead. An ASP.NET application uses neither type: it reads `HttpContext.Request` as usual.

## Examples

```csharp
[HttpHandler]
public static Task<Response> HandleAsync(Request request)
{
    if (request.Method != "POST" || request.Path != "/echo")
        return Task.FromResult(Response.Text("Not found", 404));
    var text = Encoding.UTF8.GetString(request.Body.Span);
    return Task.FromResult(Response.Text(text));
}
```

## See Also

- class [RequestHead](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/RequestHead)
- namespace [Isoplane](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk)
