Installation
Add the RDAP library to yourCargo.toml:
Cargo.toml
Your First Query
Here’s a complete example to get you started:The library requires async/await support. Make sure to use an async runtime like Tokio.
Key Concepts
Create an RdapClient
The Source reference:
RdapClient handles HTTP requests and bootstrap service discovery:src/client.rs:36Build a Request
Use Source reference:
RdapRequest to specify what you want to query:src/request.rs:73Execute the Query
Call Source reference:
query() or query_with_referral() to fetch RDAP data:src/client.rs:65Client Configuration
Custom Timeout
Set a custom timeout for HTTP requests:src/client.rs:53
Disable Registrar Referrals
For domain queries, the client follows registrar referral links by default. Disable this behavior:src/client.rs:59
Registrar referrals allow you to get more detailed domain information from the registrar’s RDAP server after querying the registry.
Auto-Detection
The library can automatically detect query types:src/request.rs:134
Next Steps
Basic Queries
Learn how to query domains, IPs, and AS numbers
Query Types
Explore all available query types
Working with Results
Extract and process RDAP response data
Error Handling
Handle errors gracefully in your application
