Skip to content

Latest commit

 

History

History

reqlang-fetch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

reqlang-fetch

A crate that exposes the Fetch trait.

Usage

use reqlang::prelude::*;
use reqlang_fetch::{Fetch, HttpRequestFetcher};

async fn main() {
    let request = HttpRequest {
        method: HttpVerb::get(),
        url: Url::parse("https://example.com").unwrap(),
        headers: vec![],
        body: None,
    };

    let fetcher: HttpRequestFetcher = request.into();

    let response: HttpResponse = fetcher.fetch().await.unwrap();
}