LSL HTTP server/examples
< LSL HTTP server
Jump to navigation
Jump to search
Revision as of 15:50, 18 July 2008 by Kelly Linden (talk | contribs) (New page: === Hello World! === Classic example. <lsl> default { state_entry() { llRequestPublicURL(); } http_request(key id, string method, string body) { if (me...)
Hello World!
Classic example. <lsl> default {
state_entry()
{
llRequestPublicURL();
}
http_request(key id, string method, string body)
{
if (method == URL_REQUEST_GRANTED)
{
llSay(0,"URL: " + body);
}
else if (method == URL_REQUEST_DENIED)
{
llSay(0, "Something went wrong, no url. " + body);
}
else if (method == "GET")
{
llHTTPResponse(id,200,"Hello World!");
}
}
} </lsl>