Skip to content

Commit

Permalink
RedirectPolicy init
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjamesjay committed Jul 28, 2024
1 parent 0aaf2e2 commit 3cca3f8
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 76 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "http_req"
version = "0.11.0"
version = "0.12.0"
license = "MIT"
description = "simple and lightweight HTTP client with built-in HTTPS support"
repository = "https://github.com/jayjamesjay/http_req"
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# http_req
> [!CAUTION]
> v0.11.0 introduces major changes to design of `RequestBuilder` and `Request`. Please review [documentation](https://docs.rs/http_req/0.11.0/http_req/) before migrating from previous versions.
> v0.12.0 replaces `RequestBuilder` with `RequestMessage`. Please review [documentation](https://docs.rs/http_req/0.12.0/http_req/) before migrating from previous versions.
[![Rust](https://github.com/jayjamesjay/http_req/actions/workflows/rust.yml/badge.svg)](https://github.com/jayjamesjay/http_req/actions/workflows/rust.yml)
[![Crates.io](https://img.shields.io/badge/crates.io-v0.11.0-orange.svg?longCache=true)](https://crates.io/crates/http_req)
[![Docs.rs](https://docs.rs/http_req/badge.svg)](https://docs.rs/http_req/0.11.0/http_req/)
[![Crates.io](https://img.shields.io/badge/crates.io-v0.12.0-orange.svg?longCache=true)](https://crates.io/crates/http_req)
[![Docs.rs](https://docs.rs/http_req/badge.svg)](https://docs.rs/http_req/0.12.0/http_req/)

Simple and lightweight HTTP client with built-in HTTPS support.
- HTTP and HTTPS via [rust-native-tls](https://github.com/sfackler/rust-native-tls) (or optionally [rus-tls](https://crates.io/crates/rustls))
- Small binary size (less than 0.7 MB for basic GET request)
- Minimal amount of dependencies

## Requirements
http_req by default uses [rust-native-tls](https://github.com/sfackler/rust-native-tls),
Expand All @@ -32,7 +35,7 @@ Take a look at [more examples](https://github.com/jayjamesjay/http_req/tree/mast
In order to use `http_req` with `rustls` in your project, add the following lines to `Cargo.toml`:
```toml
[dependencies]
http_req = {version="^0.11", default-features = false, features = ["rust-tls"]}
http_req = {version="^0.12", default-features = false, features = ["rust-tls"]}
```

## License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use http_req::{
request::RequestBuilder,
request::RequestMessage,
response::Response,
stream::{self, Stream},
uri::Uri,
Expand All @@ -19,7 +19,7 @@ fn main() {
let mut body = Vec::new();

// Prepares a request message.
let request_msg = RequestBuilder::new(&addr)
let request_msg = RequestMessage::new(&addr)
.header("Connection", "Close")
.parse();

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Simple HTTP client with built-in HTTPS support.
//!
//!
//! By default uses [rust-native-tls](https://github.com/sfackler/rust-native-tls),
//! which relies on TLS framework provided by OS on Windows and macOS, and OpenSSL
//! on all other platforms. But it also supports [rus-tls](https://crates.io/crates/rustls).
Expand Down
Loading

0 comments on commit 3cca3f8

Please sign in to comment.