HTTP_GET
Sends a GET request and returns the answer.
GET reads data. Redirects are followed, except from https to http. The results are those of the last answer. A status of 400 or higher raises HTTP_STATUS, and the results are delivered as well.
Parameters and results
connectionSTRUCT c0de_net/http/HTTP_CONNECTION: the serverendpointSTRING: the path behind the base endpoint (optional, default empty)- result
resultSTRING: the raw data of the answer - result
statusINTEGER: the HTTP status, like 200 - result
headersHASH STRING: the headers of the answer, with lower-case names
Example
c0de
CALL c0de_net/http/HTTP_GET
PARAMETER connection api ;
PARAMETER endpoint "/forecast?city=Berlin" ;
RESULT result answer