Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stepancheg/rust-http2
HTTP/2 implementation in Rust/tokio
https://github.com/stepancheg/rust-http2
http2 tokio-rs
Last synced: 12 days ago
JSON representation
HTTP/2 implementation in Rust/tokio
- Host: GitHub
- URL: https://github.com/stepancheg/rust-http2
- Owner: stepancheg
- License: mit
- Created: 2017-05-12T01:23:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-24T23:08:40.000Z (about 3 years ago)
- Last Synced: 2024-10-14T13:09:09.118Z (about 1 month ago)
- Topics: http2, tokio-rs
- Language: Rust
- Homepage:
- Size: 2.5 MB
- Stars: 209
- Watchers: 11
- Forks: 26
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# rust-http2
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/stepancheg/rust-http2/Jobs)](https://github.com/stepancheg/rust-http2/actions?query=workflow%3AJobs)
[![License](https://img.shields.io/crates/l/httpbis.svg)](https://github.com/stepancheg/rust-http2/blob/master/LICENSE.txt)
[![crates.io](https://img.shields.io/crates/v/httpbis.svg)](https://crates.io/crates/httpbis)HTTP/2 client and server implementation in Rust based on tokio.
Currently it is used as base for implementation of [grpc-rust](https://github.com/stepancheg/grpc-rust).
## Example server
Checkout the source code and execute command:
```
cargo run --example server
```Server will be available on https://localhost:8443/.
You need any modern browser with HTTP/2 support to open the page (e. g. Firefox, Safari, Chrome).Server only works over HTTP/2, if browser doesn't send HTTP/2 preface, server closes the connection.
## Example client
```
cargo run --example client https://google.com/
```Result is:
```
:status: 302
cache-control: private
content-type: text/html; charset=UTF-8
referrer-policy: no-referrer
location: https://www.google.ru/?gfe_rd=cr&ei=mZQ4WZfaGISDZOzOktgO
content-length: 257
date: Thu, 08 Jun 2017 00:04:41 GMT
alt-svc: quic=":443"; ma=2592000; v="38,37,36,35"302 Moved
302 Moved
The document has moved
here.```