From Second Life Wiki
Revision as of 06:24, 18 July 2012 by Void Singer (Talk | contribs)

Jump to: navigation, search


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).


  • This call must be made by the script containing the http_request event where the request_id was received.
  • There is no limit, other than script size, to the amount of data that can be sent by this function.
    • llHTTPRequest can truncate the response length in receiving scripts. Be aware when using them together for prim-to-prim communications.
  • Returns 'content-type: text/plain' by default. Use llSetContentType to optionally return 'text/html' if being viewed by the object owner within a Second Life client.
All Issues ~ Search JIRA for related Bugs


<lsl>key url_request;

default {

       url_request = llRequestURL();
   http_request(key id, string method, string body)
       if (url_request == id)
           url_request = "";
           if (method == URL_REQUEST_GRANTED)
               llOwnerSay("URL: " + body);
           else if (method == URL_REQUEST_DENIED)
               llOwnerSay("Something went wrong, no url. " + body);
           llHTTPResponse(id, 200, body);

See Also


•  http_request


•  llGetFreeURLs
•  llRequestURL
•  llRequestSecureURL
•  llReleaseURL
•  llGetHTTPHeader
•  llSetContentType


•  LSL http server

Deep Notes


Search JIRA for related Issues


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