HTTP::REQUEST 1g 2024-02-27 laplante@plcb.ca GOWEB/HTTP


author: laplante@plcb.ca date: 2024-02-27 title: “HTTP::REQUEST Function” version: 1.0.0 section: 1g

category: GOWEB/HTTP

Name

http::request — Retrieve HTTP request details

Synopsis

http::request()

Description

The http::request function returns all available variables and metadata related to the current HTTP request. It provides detailed information such as path, query string, scheme, username, and more.

Examples

res = {{
    request()
}};

// Might return:
res = {
  "escaped_fragment": "",
  "escaped_path": "/tests/http1/test-008",
  "fragment": "",
  "hostname": "",
  "is_abs": false,
  "join_path": "/tests/http1/test-008?x=r",
  "opaque": "",
  "password": null,
  "path": "/tests/http1/test-008",
  "port": "",
  "query": {
    "x": [ "r" ]
  },
  "rawpath": "",
  "rawquery": "x=r",
  "redacted": "/tests/http1/test-008?x=r",
  "request_url": "/tests/http1/test-008?x=r",
  "scheme": "",
  "string": "/tests/http1/test-008?x=r",
  "username": ""
}

Author

laplante@plcb.ca

See also

Version