title: What is the correct content-type header for Json RPC v2 over HTTP?
body: <p>I know that JSON RPC is not directly specified with HTTP, but I cannot find a proper solution for this. The question is, which <code>content-type</code> is correct:</p>
  
  <ol>
  <li><code>content-type: application/json</code></li>
  <li><code>content-type: application/json-rpc</code></li>
  <li>both?</li>
  </ol>
  
  <p>In the <a href="http://www.jsonrpc.org/specification" rel="nofollow noreferrer">official (?) doc for v2</a> and <a href="http://json-rpc.org/wiki/specification" rel="nofollow noreferrer">v1</a> there is nothing about content-types only in <a href="http://www.jsonrpc.org/historical/json-rpc-over-http.html" rel="nofollow noreferrer">this seemingly deprecated document</a> about JSON rcp v1.2 there is the definition of (2) but optional (1). </p>
  
  <p>By investigating the popular <a href="https://github.com/briandilley/jsonrpc4j" rel="nofollow noreferrer">jsonRPC4J java lib</a> that uses v2 spec I found in the client that they set (2):</p>
  
  <pre><code>    /**
       * Prepares a connection to the server.
       * @param extraHeaders extra headers to add to the request
       * @return the unopened connection
       * @throws IOException 
       */
      protected HttpURLConnection prepareConnection(Map&lt;String, String&gt; extraHeaders)
          throws IOException {
  
          ...
          con.setRequestProperty("Content-Type", "application/json-rpc");
  
          // return it
          return con;
      }
  </code></pre>
  
  <p>For me best practice would be to just accept both to be on the "safe" side?</p>