Giter VIP home page Giter VIP logo

rust-http2's Introduction

rust-http2

Build Status License crates.io

HTTP/2 client and server implementation in Rust based on tokio.

Currently it is used as base for implementation of 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"

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.ru/?gfe_rd=cr&amp;ei=mZQ4WZfaGISDZOzOktgO">here</A>.
</BODY></HTML>

rust-http2's People

Contributors

stepancheg avatar overvenus avatar aptakhin avatar bblancha avatar weiznich avatar disksing avatar siddontang avatar thedodd avatar przygienda avatar coocoocacha avatar erickt avatar busyjay avatar kkimdev avatar vrusinov avatar valarauca avatar

Watchers

shadowkun avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.