c0de net 0.1.0Diese Seite auf Deutsch

HTTP_HEAD ​

Sends a HEAD request: like GET, but the answer has no data.

result holds the headers of the answer as a JSON object instead, with lower-case names in alphabetical order, like {"content-length":"12"}.

Parameters and results

  • connection STRUCT c0de_net/http/HTTP_CONNECTION: the server
  • endpoint STRING: the path behind the base endpoint (optional, default empty)
  • result result STRING: the headers as JSON
  • result status INTEGER: the HTTP status
  • result headers HASH STRING: the headers of the answer

Example

c0de
CALL c0de_net/http/HTTP_HEAD
    PARAMETER connection api ;
    PARAMETER endpoint "/status" ;
    RESULT status status