Crate arti_ureq

Source
Expand description

§arti-ureq

A library to use Arti in combination with the ureq HTTP client.

§Usage

Use cargo add arti-ureq to add the dependency to your project.

// Include the library.
use arti_ureq;

// Retrieve a `ureq::Agent`.
let ureq_agent = arti_ureq::default_agent().expect("Failed to create agent.");

// Make the request.
let request = ureq_agent
    .get("https://check.torproject.org/api/ip")
    .call()
    .expect("Failed to make request.");

arti-ureq uses version 3.0 of ureq. Use arti_ureq::ureq to access the ureq crate.

View more examples in the examples directory.

§Feature flags

  • tokio (default) – Build with Tokio support.
  • async-std – Build with async-std support.
  • rustls (default) – Build with Rustls support.
  • native-tls – Build with native-tls support.

License: MIT OR Apache-2.0

Re-exports§

pub use arti_client;
pub use tor_rtcompat;
pub use ureq;

Structs§

Connector
Main entrypoint: Object for making HTTP/S requests through Tor.
ConnectorBuilder
Object for constructing a Connector.
Resolver
Resolver implementing trait [ureq::unversioned::resolver::Resolver].

Enums§

Error
Error making or using http connection.

Functions§

default_agent
Default usage: Returns an instance of [ureq::Agent] using the default Connector.
get_default_tls_provider
Returns the default [ureq::tls::TlsProvider] based on the features flag.