#fetch #browser #retina #specification #url #api #request

retina-fetch

This crate implements the Fetch API, for the Retina browser, but can be used independently

1 unstable release

0.3.0 Aug 27, 2023

#2 in #retina

Apache-2.0

35KB
597 lines

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

Dependencies

~9–21MB
~298K SLoC