An RDAP Request is a configuration object that defines how to query an RDAP server. It consists of a Type (an enum of RequestType), a Query string, and an optional Server URL.
Request Types and Bootstrapping
RDAP supports various query types. Some are 'bootstrapped', meaning the client can automatically find the correct server using IANA data. Others require you to provide the server URL manually.
| RequestType | Bootstrapped? | HTTP Path Example |
|---|
rdap.AutnumRequest | Yes | autnum/QUERY |
rdap.DomainRequest | Yes | domain/QUERY |
rdap.IPRequest | Yes | ip/QUERY |
rdap.EntityRequest | Experimental | entity/QUERY |
rdap.NameserverRequest | No | nameserver/QUERY |
rdap.DomainSearchRequest | No | domains?name=QUERY |
rdap.EntitySearchRequest | No | entities?fn=QUERY |
rdap.RawRequest | N/A | (Uses the Server field as the full URL) |
The RawRequest Type
RawRequest is a special type used when you already have a complete RDAP URL. In this case, the Server field should contain the full URL, and the Query and Params fields are ignored.
// Example of a bootstrapped request (server is found automatically)
req := rdap.NewDomainRequest("example.com")
// Example of a request requiring a manual server
server, _ := url.Parse("https://rdap.nic.cz")
req := &rdap.Request{
Type: rdap.NameserverRequest,
Query: "a.ns.nic.cz",
Server: server,
}