title: Making a GET request of a JSON RPC API instead of a POST request
body: <p>Is it possible to make a GET request to a JSON RPC API? I'm trying to do this using the random.org api (<a href="https://api.random.org/json-rpc/1/" rel="nofollow noreferrer">https://api.random.org/json-rpc/1/</a>). It's functioning if I use a POST request but I need to make GET requests for all APIs that I'm using in the application I'm working on.</p>
  <p>Here is the post request that is working:</p>
  <pre><code>function getNewThing(apiUrl) {
  
      data = {
          &quot;jsonrpc&quot;: &quot;2.0&quot;,
          &quot;method&quot;: &quot;generateIntegers&quot;,
          &quot;params&quot;: {
              &quot;apiKey&quot;: &quot;key&quot;,
              &quot;n&quot;: 1,
              &quot;min&quot;: 0,
              &quot;max&quot;: 1000000,
              &quot;replacement&quot;: true,
              &quot;base&quot;: 10
          },
          &quot;id&quot;: 683489
      }
  
      // ajax call to the api
      return $.ajax({
          type: &quot;POST&quot;,
          url: apiUrl,
          data: JSON.stringify(data),
          success: function(result) {
  
              console.log(result)
          },
          error: function(err) {
              console.log(err)
          }
      });
  }
  </code></pre>
  <p>The reason I think this can be turned into a GET request is because this documentation implies it can be: <a href="http://www.jsonrpc.org/historical/json-rpc-over-http.html#encoded-parameters" rel="nofollow noreferrer">http://www.jsonrpc.org/historical/json-rpc-over-http.html#encoded-parameters</a></p>
  <p>I've tried to set up the URL the following ways with no luck:</p>
  <p>With URL encoding for the params:</p>
  <pre><code>https://api.random.org/json-rpc/1/invoke?jsonrpc=2.0&amp;method=generateIntegers&amp;params=%7B%22apiKey%22%3A%20%229b6ed250-67fc-4afd-b60b-09c6076e5178%22%2C%22n%22%3A%201%2C%22min%22%3A%200%2C%22max%22%3A%201000000%2C%22replacement%22%3A%20true%2C%22base%22%3A%2010%7D&amp;id=683489
  </code></pre>
  <p>Without:</p>
  <pre><code>'https://api.random.org/json-rpc/1/invoke?jsonrpc=2.0&amp;method=generateIntegers&amp;params={&quot;apiKey&quot;: &quot;9b6ed250-67fc-4afd-b60b-09c6076e5178&quot;,&quot;n&quot;: 1,&quot;min&quot;: 0,&quot;max&quot;: 1000000,&quot;replacement&quot;: true,&quot;base&quot;: 10}&amp;id=683489'
  </code></pre>
  <p>What am I missing? Thanks in advance!</p>