Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

does llHttpRequest generate its own key?

Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
05-28-2006 18:02
When we initiate an http request using llHttpRequest, as part of the header it sends X-SecondLife-Object-Key and the X-SecondLife-Owner-Key to the remote server as part of the header.

The http_response event is triggered when a response to the request is returned. Part of the http_response is request_id.

Quote "request_id is set to the same value as the key returned by the llHTTPRequest which initiated the call".

This line isn't very clear. Does an llHTTPRequest generate its own key? Or, is the key being returned the key of the object that that initiated the original call?

In the case that a llHTTPRequest call *DOES* generate its own unique key, how can we retrieve that value??

Thanks,
Geuis
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
05-28-2006 18:59
further experimenting, yes indeed the llHTTPResponse does generate its own key, which is returned in http_response
yetihehe Saarinen
Registered beast
Join date: 19 Feb 2006
Posts: 40
05-29-2006 01:53
Just like llGetNotecardLine ;)
SiRiS Asturias
Chaotic Coder
Join date: 27 Sep 2005
Posts: 93
06-12-2006 07:13
From: Geuis Dassin
When we initiate an http request using llHttpRequest, as part of the header it sends X-SecondLife-Object-Key and the X-SecondLife-Owner-Key to the remote server as part of the header.

The http_response event is triggered when a response to the request is returned. Part of the http_response is request_id.

Quote "request_id is set to the same value as the key returned by the llHTTPRequest which initiated the call".

This line isn't very clear. Does an llHTTPRequest generate its own key? Or, is the key being returned the key of the object that that initiated the original call?

In the case that a llHTTPRequest call *DOES* generate its own unique key, how can we retrieve that value??

Thanks,
Geuis



Simply make a global:

key RequestID;

When you make the HTTP request do it like you would a listen:

RequestID = llHTTPRequest("http://www.YourDomain.com/Default.aspx?Com=1",[HTTP_METHOD,"POST"],"";);


This lets you filter in the response event:

if (request_id == RequestID)
{
// Do something here since the RequestID matches that of the last request.
}

Enjoy! :p
_____________________
Proud founder of:
S3 - Self Storage Systems
S3storage.net (Coming Soon!)

SLBoutique.com
SLExchange.com - Find What You Need, When You Need It.

"Light travels faster than sound. This is why some people appear bright, until you hear them speak."