Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbose must be true to have some results #22

Open
Extarys opened this issue Oct 2, 2019 · 0 comments
Open

Verbose must be true to have some results #22

Extarys opened this issue Oct 2, 2019 · 0 comments

Comments

@Extarys
Copy link

Extarys commented Oct 2, 2019

If I make 2 or 3 requests fast I get an error if Verbose is false with whois. The returned object is empty.

(async function(){

	var results = await whoisjson('*****.com', {follow: 2});
	console.log(JSON.stringify(results, null, 2));
})()

I get {}, but if I use verbose, I can have some results:

[
  {
    "server": "whois.verisign-grs.com",
    "data": {
      "domainName": "****.COM",
      ....
    }
  },
  {
    "server": "whois.****.com",
    "data": {
      "domainName": "****.com",
      "registryDomainId": "whois protect",
      ....
    }
  },
  {
    "server": "whois.****.cn",
    "data": {}
  }
]

Should whois-json be able to return something even if the last request failed? Or is it my responsability to try and detect if there is some valid data in the returned object and always use verbose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant