<p>You need to POST the request according to the <a href="http://json-rpc.org/wiki/specification" rel="nofollow">JSON RPC specifications</a>. So this will not work using Firefox without any special extension that lets you set POST information. You cannot simply request the page <code>http://user:password@localhost:8332/getinfo</code> and expect <code>bitcoind</code> to return the <code>getinfo</code>. There is no page system, it's not a normal www-server (i.e. pages hyperlinked together), it just uses the HTTP protocol to transport JSON. As long as you make that POST request correctly, I don't think it mattes what page you call.</p>

CC BY-SA 3.0
2014-07-23T14:37:23.520Z
2014-07-23T14:37:23.520Z
Jori
<p>I am attempting to access bitcoind's http-json-rpc api thru firefox. I enter the following URL </p>

<pre><code>http://user:password@localhost:8332/getinfo
</code></pre>

<p>and it returns</p>

<pre><code>There was an error parsing the JSON document. The document may not be well-formed.
Document contents:
</code></pre>

<p>So the document contents are empty, but when I inspect element and look at the response, I get </p>

<pre><code>Status-code: 404 Not Found
Connection: Close
Content-Type: "application/json"
Server: "bitcoin-json-rpc/v0.8.2-815-g5f083af-beta"
</code></pre>

<p>So the server is replying, but doesn't recognize the request or something. </p>

<p>My bitcoin.conf file reads</p>

<pre><code>rpcuser=user
rpcpassword=password
rpcport=8332
</code></pre>

<p>If I do </p>

<pre><code> http://user:password@localhost:8332/
</code></pre>

<p>instead, it gives me a 500 Internal Server Error</p>

<p>Any idea what is missing?</p>

<bitcoind><json-rpc>
Talking to bitcoind thru web browser returns empty JSON document
Zeemer
# Talking to bitcoind thru web browser returns empty JSON document

(Asked by: username_0 on 2014-01-31)

I am attempting to access bitcoind's http-json-rpc api thru firefox. I enter the following URL 
http://user:password@localhost:8332/getinfo

and it returns
There was an error parsing the JSON document. The document may not be well-formed.
Document contents:

So the document contents are empty, but when I inspect element and look at the response, I get 
Status-code: 404 Not Found
Connection: Close
Content-Type: "application/json"
Server: "bitcoin-json-rpc/v0.8.2-815-g5f083af-beta"

So the server is replying, but doesn't recognize the request or something. 
My bitcoin.conf file reads
rpcuser=user
rpcpassword=password
rpcport=8332

If I do 
 http://user:password@localhost:8332/

instead, it gives me a 500 Internal Server Error
Any idea what is missing?

**Tags:** bitcoind, json-rpc


---

## 1 answers

### Answer by username_1 on 2014-07-23. Score: 1

You need to POST the request according to the [JSON RPC specifications](http://json-rpc.org/wiki/specification). So this will not work using Firefox without any special extension that lets you set POST information. You cannot simply request the page `http://user:password@localhost:8332/getinfo` and expect `bitcoind` to return the `getinfo`. There is no page system, it's not a normal www-server (i.e. pages hyperlinked together), it just uses the HTTP protocol to transport JSON. As long as you make that POST request correctly, I don't think it mattes what page you call.


---

