retina-fetch

Crates.ioretina-fetch
lib.rsretina-fetch
version0.3.0
sourcesrc
created_at2023-08-27 14:01:56.285379
updated_at2023-08-27 14:01:56.285379
descriptionThis crate implements the Fetch API, for the Retina browser, but can be used independently.
homepagehttps://github.com/usadson/retina/tree/main/retina-fetch
repositoryhttps://github.com/usadson/retina
max_upload_size
id956097
size63,964
Tristan Gerritsen (usadson)

documentation

README

Retina-Fetch

This crate provides the Fetch API implementation for the Retina Browser, but can be used independently. It currently covers some of the specification, with full intention to conform to all of the Fetch Standard and HTTP, as well as the W3C Web App.

Installing

cargo add retina-fetch

Example

use retina_fetch::{Fetch, Request};
use url::Url;

#[tokio::main]
async fn main() {
    let fetch = Fetch::new();

    let url = Url::parse("https://example.org/").unwrap();
    let request = Request::get_document(url, Default::default());

    let response = fetch.fetch(request).await.unwrap();
    println!("Response {response:#?}");
}

References

Commit count: 561

cargo fmt