| .forgejo/workflows | ||
| http-client | ||
| http-client-hyper | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
HTTP Client
This repository contains the code for the http-client crate, which serves as an abstraction over actual HTTP clients used by LTFNet and/or Tiwind Software projects.
As such, it is tailored for my personal use and should probably not be used by projects outside LTFNet/TWS.
You're still welcome to use this code, copy it, modify it, and ship it however you like, but you're on your own if you decide to do so.
Crates available
http-client
This crate contains the HTTP client abstraction:
- A
HttpClienttrait that can be implemented to provide a usable HTTP client. - A
HttpRequeststructure that is used by theHttpClienttrait to represent an HTTP request, and a associatedHttpRequestBuilderthat provides a builder-like interface to create such requests. - A
HttpResponsestructure that is returned by theHttpClienttrait when a request is completed. - And finally a
HttpErrortype to represent potential errors that can occur during HTTP requests.
All these types are documented (albeit a bit roughly) and can be used along with an implementation, which is provided in this repository by the http-client-* crates.
There is also the json feature that can be enabled to add support for JSON serialization/deserialization using serde.
http-client-hyper
This crate provides an implementation of the HttpClient trait using the Hyper library.
It supports HTTPS/TLS, although TLS support was not tested much.