You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is exactly what I want but when I try using custom service url https://rdap.markmonitor.com/rdap to respond to domain query for google.com, I get error No RDAP servers responded successfully (tried 1 server(s)). Here is my code:
func CustomUsage() {
// Advanced usage:
//
// This demonstrates custom FetchRoles, a custom Context, a custom HTTP client,
// a custom Bootstrapper, and a custom timeout.
// // Nameserver query on rdap.nic.cz.
server, _ := url.Parse("https://rdap.markmonitor.com/rdap")
req := &rdap.Request{
Type: rdap.DomainRequest,
Query: "google.com",
//FetchRoles: []string{"all"},
//Timeout: time.Second * 45, // Custom timeout.
Server: server,
}
//fmt.Println(req.URL())
//req = req.WithContext(context.Context) // Custom context (see https://blog.golang.org/context).
client := &rdap.Client{}
//client.HTTP = &http.Client{} // Custom HTTP client.
//client.Bootstrap = &bootstrap.Client{} // Custom bootstapper.
resp, err := client.Do(req)
if err != nil {
fmt.Println(err.Error())
}
if ns, ok := resp.Object.(*rdap.Domain); ok {
fmt.Printf("Handle=%s Domain=%s\n", ns.Handle, ns.LDHName)
}
}
Thanks
The text was updated successfully, but these errors were encountered:
This is exactly what I want but when I try using custom service url
https://rdap.markmonitor.com/rdap
to respond todomain
query forgoogle.com
, I get errorNo RDAP servers responded successfully (tried 1 server(s))
. Here is my code:Thanks
The text was updated successfully, but these errors were encountered: