Difference between revisions of "Http request"

From Second Life Wiki
Jump to navigation Jump to search
Line 2: Line 2:
|mode=request
|mode=request
|event_delay|event=http_request
|event_delay|event=http_request
|p1_type=string|p1_name=method|p1_desc=GET,POST,PUT
|p1_type=key|p1_name=request_id|p1_desc=HTTP request id for response use.
|p2_type=string|p2_name=path_info|p2_desc=
|p2_type=string|p2_name=method|p2_desc=GET,POST,PUT
|p3_type=list|p3_name=params|p3_desc=HTTP request parameters in the format<br />[param1, value1, param2, value2, . . . paramN, valueN]
|p3_type=string|p3_name=path_info|p3_desc=
|p4_type=string|p4_name=body|p4_desc=Contents of the request.
|p4_type=list|p4_name=params|p4_desc=HTTP request parameters in the format<br />[param1, value1, param2, value2, . . . paramN, valueN]
|p5_type=string|p5_name=body|p5_desc=Contents of the request.
|event_desc=Triggered when task receives an HTTP request.
|event_desc=Triggered when task receives an HTTP request.
|constants=
|constants=
|spec
|spec
|caveats
|caveats
|examples
|examples=<pre>
default
{
    http_request(key request_id, string method, string path_info, list parameters, string body)
    {
        // Loop Back Request Data
        llHTTPResponse(request_id, parameters, body);
    }
}
</pre>
|helpers
|helpers
|also_header
|also_header
|also_events
|also_events={{LSL DefineRow||[[http_server]]}}
|also_functions={{LSL DefineRow||[[llHTTPServer]]|For opening an llHTTPServer.}}
|also_functions={{LSL DefineRow||[[llHTTPServer]]|For opening an llHTTPServer.}}
{{LSL DefineRow||[[llHTTPServerRemove]]|For removing the current HTTP server from a prim.}}
{{LSL DefineRow||[[llHTTPServerRemove]]|For removing the current HTTP server from a script.}}
{{LSL DefineRow||[[llGetHTTPServerURL]]|For retrieving the current HTTP server URL.}}
{{LSL DefineRow||[[llGetHTTPServerURL]]|For retrieving the current HTTP server URL.}}
{{LSL DefineRow||[[llHTTPResponse]]|For replying to HTTP requests.}}
{{LSL DefineRow||[[llHTTPResponse]]|For replying to HTTP requests.}}

Revision as of 20:06, 6 November 2007

Emblem-important-yellow.png LSL Feature Request
The described event does not exist. This article is a feature request.

Description

Event: http_request( key request_id, string method, string path_info, list <span title="HTTP request parameters in the format
[param1, value1, param2, value2, . . . paramN, valueN]" style="border-bottom:1px dotted; cursor:help;">params
, string body ){ ; }

Triggered when task receives an HTTP request.

• key request_id HTTP request id for response use.
• string method GET,POST,PUT
• string path_info
• list params HTTP request parameters in the format
[param1, value1, param2, value2, . . . paramN, valueN]
• string body Contents of the request.

Examples

default
{
    http_request(key request_id, string method, string path_info, list parameters, string body)
    {
        // Loop Back Request Data
        llHTTPResponse(request_id, parameters, body);
    }
}

Notes

Zero Linden's Office Hours Discussion On Incoming HTTP: [1]
PJIRA feature request at SVC-913
Please go vote if this feature is important to you.

See Also

Events

•  http_server

Functions

•  llHTTPServer For opening an llHTTPServer.
•  llHTTPServerRemove For removing the current HTTP server from a script.
•  llGetHTTPServerURL For retrieving the current HTTP server URL.
•  llHTTPResponse For replying to HTTP requests.
•  llEscapeURL
•  llUnescapeURL

Deep Notes

Signature