An open API service indexing awesome lists of open source software.

https://github.com/murphsicles/http

@net/http - Core HTTP types for Zeta
https://github.com/murphsicles/http

Last synced: 22 days ago
JSON representation

@net/http - Core HTTP types for Zeta

Awesome Lists containing this project

README

          

# @net/http — Core HTTP Types for Zeta

Zeta port of the [hyperium/http](https://github.com/hyperium/http) library (v1.2.0).

## Features

- `Request` and `Response` with builder pattern
- `Method` (GET, POST, PUT, DELETE, HEAD, OPTIONS, CONNECT, PATCH, TRACE)
- `StatusCode` with all standard codes
- `HeaderMap`, `HeaderName`, `HeaderValue`
- `Uri` with scheme, authority, path, query components
- `Version` (HTTP/0.9 through HTTP/3.0)

## Usage

```zeta
use http::{Request, Response, Method, StatusCode};

let req = Request::builder()
.method(Method::GET)
.uri("https://example.com/")
.header("Accept", "text/html")
.body("");
```

## License

MIT