2020-10-30 02:50:53 +00:00
# awc (Actix Web Client)
2019-04-16 10:49:38 -07:00
2020-10-30 02:50:53 +00:00
> Async HTTP and WebSocket client library.
2019-04-16 10:49:38 -07:00
2020-10-30 02:50:53 +00:00
[](https://crates.io/crates/awc)
[](https://docs.rs/awc/2.0.1)

[](https://deps.rs/crate/awc/2.0.1)
[](https://gitter.im/actix/actix-web?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge& utm_content=badge)
2019-04-16 10:49:38 -07:00
2020-10-30 02:50:53 +00:00
## Documentation & Resources
- [API Documentation ](https://docs.rs/awc/2.0.1 )
- [Example Project ](https://github.com/actix/examples/tree/HEAD/awc_https )
- [Chat on Gitter ](https://gitter.im/actix/actix-web )
- Minimum Supported Rust Version (MSRV): 1.42.0
2019-04-16 10:49:38 -07:00
## Example
```rust
use actix_rt::System;
use awc::Client;
2019-04-16 10:50:37 -07:00
use futures::future::{Future, lazy};
2019-04-16 10:49:38 -07:00
fn main() {
System::new("test").block_on(lazy(|| {
let mut client = Client::default();
client.get("http://www.rust-lang.org") // < - Create request builder
.header("User-Agent", "Actix-web")
.send() // < - Send http request
.and_then(|response| { // < - server http response
println!("Response: {:?}", response);
Ok(())
})
}));
}
```