Crate easy_http_request
source ·Expand description
Easy HTTP Request
Easy to send HTTP/HTTPS requests.
Example
extern crate easy_http_request;
use easy_http_request::DefaultHttpRequest;
let response = DefaultHttpRequest::get_from_url_str("https://magiclen.org").unwrap().send().unwrap();
println!("{}", response.status_code);
println!("{:?}", response.headers);
println!("{}", String::from_utf8(response.body).unwrap());
More examples are in the examples
directory.
Re-exports
pub extern crate futures;
pub extern crate http;
pub extern crate hyper;
pub extern crate hyper_tls;
pub extern crate mime;
pub extern crate tokio_core;
pub extern crate url;
Structs
The http request sender. See
DefaultHttpRequest
or StaticHttpRequest
.The http response.
Enums
A http request body that you want to send.
The HTTP request method.
Type Definitions
Use strings for query, body and headers.
Use static string slice for query, body and headers.