rdap_client

Crates.iordap_client
lib.rsrdap_client
version0.2.0
sourcesrc
created_at2020-01-13 21:00:14.532385
updated_at2021-07-14 11:10:58.030715
descriptionAsync and fast RDAP client and parser.
homepagehttps://github.com/JakubOnderka/rdap_client
repositoryhttps://github.com/JakubOnderka/rdap_client
max_upload_size
id198172
size80,099
Jakub Onderka (JakubOnderka)

documentation

https://docs.rs/rdap_client

README

rdap_client

Async and fast RDAP client and parser for Rust.

Documentation Build Status Crates.io

Usage

Add this to your Cargo.toml:

[dependencies]
rdap_client = "0.2"
tokio = "0.2"

and then you can use it like this:

use rdap_client::Client;

#[tokio::main]
async fn main() {
    let client = Client::new();
    let domain_to_check = "nic.cz";
    // Fetch boostrap from IANA.
    let bootstrap = client.fetch_bootstrap().await.unwrap();
    // Find what RDAP server to use for given domain.
    if let Some(servers) = bootstrap.dns.find(&domain_to_check) {
        let response = client.query_domain(&servers[0], domain_to_check).await.unwrap();
        println!("{}", response.handle);
    }
}

Because of usage async-await syntax, minimum required Rust version is 1.39.0.

Supported standards

Supported extensions

Non standard responses

Not all RDAP servers follows RFC 7483 and then parser cannot parse that responses correctly. If that happend, feel free to open issue with URI that rdap_client could not parse.

Useful articles

Commit count: 47

cargo fmt