2020-10-30 02:50:53 +00:00
# awc (Actix Web Client)
2019-04-16 17:49:38 +00:00
2020-10-30 02:50:53 +00:00
> Async HTTP and WebSocket client library.
2019-04-16 17:49:38 +00:00
2020-10-30 02:50:53 +00:00
[![crates.io ](https://img.shields.io/crates/v/awc?label=latest )](https://crates.io/crates/awc)
2020-11-29 16:33:45 +00:00
[![Documentation ](https://docs.rs/awc/badge.svg?version=2.0.3 )](https://docs.rs/awc/2.0.3)
2020-10-30 02:50:53 +00:00
![Apache 2.0 or MIT licensed ](https://img.shields.io/crates/l/awc )
2020-11-29 16:33:45 +00:00
[![Dependency Status ](https://deps.rs/crate/awc/2.0.3/status.svg )](https://deps.rs/crate/awc/2.0.3)
2020-10-30 02:50:53 +00:00
[![Join the chat at https://gitter.im/actix/actix-web ](https://badges.gitter.im/actix/actix-web.svg )](https://gitter.im/actix/actix-web?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge& utm_content=badge)
2019-04-16 17:49:38 +00:00
2020-10-30 02:50:53 +00:00
## Documentation & Resources
2020-11-25 00:07:56 +00:00
- [API Documentation ](https://docs.rs/awc )
2020-10-30 02:50:53 +00:00
- [Example Project ](https://github.com/actix/examples/tree/HEAD/awc_https )
- [Chat on Gitter ](https://gitter.im/actix/actix-web )
2020-12-28 00:44:15 +00:00
- Minimum Supported Rust Version (MSRV): 1.46.0
2019-04-16 17:49:38 +00:00
## Example
```rust
use actix_rt::System;
use awc::Client;
fn main() {
2021-02-07 01:00:40 +00:00
System::new().block_on(async {
2020-11-04 22:20:01 +00:00
let client = Client::default();
let res = client
.get("http://www.rust-lang.org") // < - Create request builder
.header("User-Agent", "Actix-web")
.send() // < - Send http request
.await;
println!("Response: {:?}", res); // < - server http response
});
2019-04-16 17:49:38 +00:00
}
```