Jump to content

After Ready Player One: create a working computer inworld


You are about to reply to a thread that has been inactive for 2840 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi After a lot of research I found the way to create a virtual computer in world: use the OpenStack api to create a instance ,get the console url and set the url to a media face. But I have a problem. In python I do: In python I do this:

 r = requests.post("http://openstack-vcenter:5000/v3/auth/tokens", data=data, headers=headers)
token_id = r.headers["X-Subject-Token"]

and I have the header I need in token_id. In lsl I do this:

key http_request_id;
default {
  state_entry() {
    llSay(0, "Script running"); 
  }
  touch_end(integer num_detected) {
    http_request_id = llHTTPRequest("http://openstack-vcenter:5000/v3/auth/tokens", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], data);
  }
  http_response(key request_id, integer status, list metadata, string body) {
    if (request_id != http_request_id) return;// exit if unknown vector
    COLOR_BLUE = <0.0, 0.0, 1.0>;
    float OPAQUE = 1.0;
    string header = llGetHTTPHeader(request_id, "x-subject-token");
    llSetText("header: " + header + "\nbody: " + body, COLOR_BLUE, OPAQUE);
  }
}

And the var header is empty! What I am doing wrong? Thank you.

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2840 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...