ll.HTTPResponse

ll.HTTPResponse (HTTPRequestID: uuid, Status: number, Body: string) -> ()

Responds to an incoming HTTP request which was triggerd by an http_request event within the script. HTTPRequestID specifies the request to respond to (this ID is supplied in the http_request event handler). Status and Body specify the status code and message to respond with.

Example

ll.HTTPResponse(uuid(<key>), 3.14, 'test')
Raw function spec json
{
  "def": "func",
  "desc": "Responds to an incoming HTTP request which was triggerd by an http_request event within the script. HTTPRequestID specifies the request to respond to (this ID is supplied in the http_request event handler).  Status and Body specify the status code and message to respond with.",
  "energy": 10,
  "sleep": 0,
  "must_use": false,
  "link": "https://wiki.secondlife.com/wiki/LlHTTPResponse",
  "private": false,
  "takesSelf": false,
  "name": "HTTPResponse",
  "signatures": [
    {
      "def": "signature",
      "result": [
        {
          "name": "",
          "def": "result",
          "desc": "",
          "variadic": false,
          "type": [
            {
              "def": "simple",
              "value": "()"
            }
          ],
          "optional": false
        }
      ],
      "args": [
        {
          "def": "arg",
          "name": "HTTPRequestID",
          "desc": "A valid HTTP request key.",
          "type": [
            {
              "def": "simple",
              "value": "uuid"
            },
            {
              "def": "simple",
              "value": "string"
            }
          ],
          "variadic": false,
          "optional": false
        },
        {
          "def": "arg",
          "name": "Status",
          "desc": "HTTP Status (200, 400, 404, etc.).",
          "type": [
            {
              "def": "simple",
              "value": "number"
            }
          ],
          "variadic": false,
          "optional": false
        },
        {
          "def": "arg",
          "name": "Body",
          "desc": "Contents of the response.",
          "type": [
            {
              "def": "simple",
              "value": "string"
            }
          ],
          "variadic": false,
          "optional": false
        }
      ]
    }
  ]
}

< Back to ll