_. The value for the
Content-lengthfields is translated into an integer.
Here is an example:
?- http_read_request(user_input, X). |: GET /mydb?class=person HTTP/1.0 |: Host: gollem |: X = [ input(user), method(get), search([ class = person ]), path('/mydb'), http_version(1-0), host(gollem) ].
Where the HTTP
GET operation is intended to get a
document, using a path and possibly some additional search
POST operation is intended to hand
potentially large amounts of data to the server for processing.
The Request parameter above contains the term
The data posted is left on the input stream that is available through
input(Stream) from the Request header.
This data can be read using http_read_data/3
from the HTTP client library. Here is a demo implementation simply
returning the parsed posted data as plain text (assuming