Skip to content
/ httpc Public

An HTTP client working both natively and in WASM environments.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

d-e-s-o/httpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipeline crates.io Docs rustc

httpc

httpc is a Rust library crate providing an HTTP client that works both natively as well as in a bare bones WASM environment as used in web browsers. That is to say, the client code looks exactly the same and all that is needed to switch between the two is to compile for a different target platform (wasm32-unknown-unknown).

When compiling natively, the crate relies on hyper as the underlying HTTP client. When targeting WASM it works directly with the Fetch API as exposed through web-sys.

The crate does not yet provide functionality for all potential HTTP client use cases, though that is mostly a matter of implementing it: the interface should be able to cater to most use cases.

One of the main pain points of making HTTP requests in a certain application from a WASM environment is arguably testing it properly. httpc comes with a test suite covering supported functionality and it includes all the necessary setup code to make it run both natively as well as when targeting WASM.

About

An HTTP client working both natively and in WASM environments.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks