Retrieving data from an HTTPS API endpoint using JQuery $.ajax
<p>Just getting started with JQuery here; please pardon what I'm sure are terrible questions.</p>

<p>I'm trying to grab some info from an HTTPS API endpoint using the JQuery $.ajax API.</p>

<p>My API is definitely functioning....it conveniently also accepts standard GET requests, so it's pretty easy to see the data that I want to get in my JavaScript.</p>

<p>Ignoring the HTTPS auth for a second (that should be pretty easily handled with the ajax settings or ajaxSetup though from what I understand), when I issue a browser request of the form:
<code>https://192.168.155.200/json-rpc/1.0?method=GetCompleteStats</code></p>

<p>I get a bunch of JSON text spewed back at me in the browser with various info as a result. I'd like to have this formatted as just HTML or plain text for the moment and throw it right in the browser....this is just a proof-of-concept for the moment while I get my legs.</p>

<p>I've stepped through a few tutorials that resulted in functioning demos, although I can't seem to iron this one out. My code does....nothing at the moment. I'd like it to issue an AJAX POST request to the API endpoint when the button is pressed (only one button on the page) and just throw the results into a paragraph tag in a div selector.</p>

<pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;lolsfajaxclient&lt;/title&gt;
    &lt;script type="text/JavaScript" src="jquery.js"&gt;&lt;/script&gt;
    &lt;script type="text/JavaScript"&gt;
      $.ajaxSetup({
        url: "https://192.168.155.200/json-rpc/1.0",
        type: "POST",
        username: "admin",
        password: "lolpassword"
      });

      $("#post").click(function(){
        var completestats = $.ajax({
          data: {method: "getCompleteStats"},
          dataType: "html",
          success: function(data) {
            $("#quote p").html(data);
            alert('Load was performed.');
          }

        });
      });
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;input type="submit" id="post" value="ajaxin that shit"&gt;&lt;br&gt;&lt;br&gt;
    &lt;div id="result"&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and </p>
