OsRequestSecureURL

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Page creation)
 
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
 
|threat_level=Moderate
 
|threat_level=Moderate
|function_syntax=void osRequestURL(list options)
+
|delay=0
 +
|function_syntax= key osRequestSecureURL(list options)
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 
//
 
//
Line 37: Line 38:
 
|description=Requests one HTTPS:// url (opensim version 0.9 or over)
 
|description=Requests one HTTPS:// url (opensim version 0.9 or over)
 
Option supported : "allowXss" - Add 'Access-Control-Allow-Origin: *' to response header
 
Option supported : "allowXss" - Add 'Access-Control-Allow-Origin: *' to response header
|
+
|additional_info=This function was added in 0.9.0-post-fixes
 
}}
 
}}

Latest revision as of 11:57, 18 October 2021

key osRequestSecureURL(list options)
Requests one HTTPS:// url (opensim version 0.9 or over)

Option supported : "allowXss" - Add 'Access-Control-Allow-Origin: *' to response header

Threat Level Moderate
Permissions No permissions specified
Extra Delay 0 seconds
Example(s)
//
//osRequestSecureURL example
//
 
RequestReceived (key id, string query) {
    llHTTPResponse (id,200,query+" OK");
    query = llUnescapeURL(query);
    llSay (0, query);
}
 
default {
 
    state_entry() {
        osRequestSecureURL ([ "allowXss" ]);
    }
 
    http_request(key id, string method, string body) {
 
        if (method == URL_REQUEST_GRANTED)
           llOwnerSay ("URL_REQUEST_GRANTED" +"\n" +body);
 
        if (method == URL_REQUEST_DENIED)
            llOwnerSay ("URL_REQUEST_DENIED");
 
        if (method == "GET")
            RequestReceived (id, llGetHTTPHeader(id,"x-query-string"));
 
        if (method == "POST")
            RequestReceived (id, body);
    }
 
}
Notes
This function was added in 0.9.0-post-fixes
Personal tools
General
About This Wiki