---
title: "Http"
url: https://una-lang.org/en/docs/std/prelude/Http/
release: v0.4.0
edition: "0.2 and later"
source: https://github.com/una-lang/una/blob/v0.4.0/docs/std/listing.json
---

# Http

A capability of the prelude, in scope in every module. Edition 0.2 and later.

```una
pub capability Http
  op get(url: Text, headers: List[Header], key_name: Option[Text]) -> internal Response
    fails HttpError
    accepts internal
  op post(url: Text, headers: List[Header], body: Text, key_name: Option[Text]) -> internal Response
    fails HttpError
    accepts internal
  op put(url: Text, headers: List[Header], body: Text, key_name: Option[Text]) -> internal Response
    fails HttpError
    accepts internal
  op delete(url: Text, headers: List[Header], key_name: Option[Text]) -> internal Response
    fails HttpError
    accepts internal
```

HTTP/1.1 to the origins that `http:` grants allow (`spec/24 §1`). `key_name` sends the key of that name from the `keys:` grants as a bearer token, which the program never sees.

## Specification

- [`spec/24 §1`](https://una-lang.org/en/docs/spec/24-http/#s1)

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).
