Crate talap

Source
Expand description

§Easy HTTP Request

Easy to send HTTP/HTTPS requests.

§Example

use talap::Request;
async fn status(){
let response = Request::get_from_url("https://www.apple.com/").await.unwrap().send().await.unwrap();
assert_eq!(response.status_code,200);
}

More examples are in the examples directory.

Re-exports§

pub extern crate hyper;
pub extern crate hyper_native_tls;
pub extern crate mime;
pub extern crate slash_formatter;
pub extern crate url;

Structs§

HttpRequest
The http request sender. See DefaultHttpRequest or StaticHttpRequest.
HttpRequestOptions
Options for HttpRequest.
HttpResponse
The http response.

Enums§

HttpRequestBody
A http request body that you want to send.
HttpRequestError
Errors for HttpRequest.
HttpRequestMethod
The HTTP request method.

Functions§

is_local_ipv4
if is ipv4 return true
is_local_ipv6
if is ipv6 return true

Type Aliases§

Request
Use strings for query, body and headers.
StaticHttpRequest
Use static string slices for query, body and headers.