ProxyGet

ProxyApi operation which retrieves a record using an http-post request. The body of the request should contain the image data of a QR Code Token. If succesful, the response body will contain the record data.

Synopsis

Submit

POST /<ProxyServletPath>/ HTTP/1.1
Host: <ProxyHost:ProxyPort>
Content-Type: image/jpeg
Content-Length: 9271
Expect: 100-continue

Fields:

ProxyServletPath
Path to the Proxy Servlet on the host. Example: /SharedRecordsProxyServer/
ProxyHost
IP address of Shared Records server. Example: sra.sharedrecords.org
ProxyPort
Network port of the Shared Records server. Example: 8080

Headers:

Content-Type
Should always be image/jpeg.
Content-Length
Length of data in body.

Body:

The QR Code Token image data.

Response

HTTP/1.1 100 Continue
HTTP/1.1 200 OK
X-Powered-By: Servlet/2.4
x-amz-meta-<Option>: value

Headers:

x-amz-meta-<Option>
Any x-amz-meta-* optional headers which were used when the record was submitted with ProxyPut will be returned.

Body:

The record data.

Examples

Command-line

The following command-line example uses the common unix "curl" utility to download a record from the Shared Records server and save it in a file named "from_proxy.txt". The file "original.txt.token.jpg" is the QR Code Token image file which was created when the data was stored using ProxyPut.

curl --data-binary @original.txt.token.jpg --header "Content-Type: image/jpeg" \
http://sra.sharedrecords.org:8080/SharedRecordsProxyServer/ > from_proxy.txt

Note: the "\" character is used to indicate that the line continues. To copy-and-paste this command, remove those characters and remove whitespace in the URI.