---
title: "Request"
url: https://una-lang.org/en/docs/std/host/Request/
release: v0.4.0
edition: "0.4, 0.5 preview"
source: https://github.com/una-lang/una/blob/v0.4.0/docs/std/listing.json
---

# Request

A kind of the module `std.host`, which a module imports by name; the prelude does not put it in scope ([`spec/31 §1`](https://una-lang.org/en/docs/spec/31-http-servers/1-the-capability/#s1)). Edition 0.4, 0.5 preview.

```una
pub kind Request
  method: internal Method
  target: internal Text
  segments: internal List[Text]
  params: internal List[Param]
  headers: internal List[Header]
  body: internal Text
  peer: internal Text
  listener: internal Text
```

A request, as the host read it (`spec/31 §3`, `§4`): its target in origin-form as received, its path split on `/` and percent-decoded segment by segment, the parameters of its query decoded in order, its headers with names in ASCII lower case in the order received, its whole body, the peer's IP address without its port, and the grant's address as the grant writes it. The parameters are `params`, since `query` is a reserved word (`spec/01`).

## Specification

- [`spec/31 §3`](https://una-lang.org/en/docs/spec/31-http-servers/3-reading-a-request/#s3)

Generated from the standard modules of una v0.4.0 ([`docs/std/listing.json`](https://github.com/una-lang/una/blob/5fec93d88932b333feec25e589355a2cb34c37b5/docs/std/listing.json), which is not part of the specification). The specification governs: [`spec/14 §1`](https://una-lang.org/en/docs/spec/14-standard-library/#s1).
