Difference between revisions of "LlHTTPResponse"

From Second Life Wiki
Jump to: navigation, search
m
(added note about sending more than 2k characters to an SL object being lost (grrr))
Line 10: Line 10:
 
|spec
 
|spec
 
|caveats=*This call must be made by the script containing the [[http_request]] event where the '''request_id''' was received.
 
|caveats=*This call must be made by the script containing the [[http_request]] event where the '''request_id''' was received.
 +
*Remember that [[http_request]] is limited to 2K character body size incoming, so if responding to an SL object, anything over 2K characters sent with this function will be lost at the receiver.
 
|constants
 
|constants
 
|examples=
 
|examples=

Revision as of 21:16, 13 July 2009

Summary

Function: llHTTPResponse( key request_id, integer status, string body );

Responds to request_id with status and body.

• key request_id A valid HTTP request key.
• integer status HTTP Status (200, 400, 404, etc)
• string body Contents of the response.

The response need not be made inside the http_request event but if it does not happen in a timely fashion the request will time out (within 25 seconds).

Caveats

  • This call must be made by the script containing the http_request event where the request_id was received.
  • Remember that http_request is limited to 2K character body size incoming, so if responding to an SL object, anything over 2K characters sent with this function will be lost at the receiver.
All Issues ~ Search JIRA for related Bugs

Examples

See Also

Events

•  http_request

Functions

•  llGetFreeURLs
•  llRequestURL
•  llRequestSecureURL
•  llReleaseURL
•  llGetHTTPHeader

Articles

•  LSL http server

Deep Notes

History

Search JIRA for related Issues

Signature

function void llHTTPResponse( key request_id, integer status, string body );