Class WhoisHttpAction

  • All Implemented Interfaces:

    public final class WhoisHttpAction
    extends java.lang.Object
    implements java.lang.Runnable
    Human-Friendly HTTP WHOIS API

    This API uses easy to understand paths rather than WhoisAction which requires a POST request containing a WHOIS command. Because the typical WHOIS command is along the lines of "domain" or the equivalent ", this action is just going to replace the slashes with spaces and let WhoisReader figure out what to do.

    This action accepts requests from any origin.

    You can send AJAX requests to our WHOIS API from your very own website using the following embed code:

     <input id="query-input" placeholder="Domain, Nameserver, IP, etc." autofocus>
     <button id="search-button">Lookup</button>
     <pre id="whois-results"></pre>
      (function() {
        var WHOIS_API_URL = '';
        function OnKeyPressQueryInput(ev) {
          if (typeof ev == 'undefined' && window.event) {
            ev = window.event;
          if (ev.keyCode == 13) {
        function OnClickSearchButton() {
          var query = document.getElementById('query-input').value;
          var req = new XMLHttpRequest();
          req.onreadystatechange = function() {
            if (req.readyState == 4) {
              var results = document.getElementById('whois-results');
              results.textContent = req.responseText;
'GET', WHOIS_API_URL + escape(query), true);
        document.getElementById('search-button').onclick = OnClickSearchButton;
        document.getElementById('query-input').onkeypress = OnKeyPressQueryInput;
    See Also:
    • Field Summary

      Modifier and Type Field Description
      static java.lang.String PATH  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable