I followed gavinadresen's answer at Bitcoin-Qt command line control on Mac. When I enter the following in terminal, it works:
open Bitcoin-Qt.app --args -server
I've put in the following into my bitcoin.conf file:
rpcuser=yourname
rpcpassword=password
I entered the following in terminal:
curl --user yourname --data-binary '{"id":"t0", "method": "getinfo", "params": [] }' http://127.0.0.1:8332/
The above prompts me for the password and then it shows the following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>Error</TITLE>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
</HEAD>
<BODY><H1>401 Unauthorized.</H1></BODY>
</HTML>
The above output doesn't look right. Aren't I supposed to get data from Bitcoin? How do I get the curl command to work?