Git Product home page Git Product logo

rtv's Introduction

Rtv

Rtv is a simple, minimal dependency, HTTP client that runs ontop of mio. It supports fully nonblocking requests, even dns resolution is nonblocking. You can also use it with async as a much more light weight (but also less robust and featurefull) alternative to something like hyper.

You can either setup mio youself and then use a Client to make requests using your own Poll or alternatively you can use a SimpleClient if you want to use async. However the latter is currently supported on 64 bit unix only.

Example (Client)

This is the main functionality that this crate provides. You can find an example here on docs.rs.

Example (SimpleClient)

It is really simple to make a single request. This is not the only functionality that this client provides though!

let mut client = SimpleClient::new()?;
let request = Request::get().host("google.com");
client.send(request).await?;

Mio Httpc

This crate is similar to mio_httpc, however the API is much more clean, in my opinion. MioHttpc makes event handling, timeouts and errors very verbose, while this crate aims to provide a much simpler interface that only requires calling one function (pump). Rtv supports only a subset of mio_httpc's features though and is probably not as efficient and stable. Rtv really is a simple HTTP client.

Notes

Earlier versions of this crate were completely different. I decided to repurpose the name because I don't wanna litter my profile or crates.io.

  • First rtv was a crate for doing recursive-file-traversal
  • Then it was a crate for resolving futures (completely useless)

rtv's People

Contributors

foxcirc avatar

Stargazers

 avatar

Watchers

 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.