bitcoin/bitcoin — pull request #2844 by jgarzik (2013-07-22 19:35:03+00:00)
Title: Add unauthenticated HTTP REST interface

Supported API;

1) GET /rest/tx/TX-HASH

Given a transaction hash,
Returns a transaction, in binary, hex-encoded binary or JSON formats.

2) GET /rest/block/BLOCK-HASH

Given a block hash,
Returns a block, in binary, hex-encoded binary or JSON formats.

Select format by setting the "bitcoin-format" HTTP header to
one of the following values (all lowercase):
binary
hex
json

The HTTP request and response are both handled entirely in-memory,
thus making maximum memory usage at least 3MB (1 MB max block, plus
hex encoding) per request.