I'm testing the new function llHttpRequest which is new in the 1.10 release. But I cant seem to get it to work...
Here is my code:
key requestid;
default
{
state_entry()
{
llSetText("Hello.", <1,0,0>, 1.0);
//llSetTimerEvent(30);
}
touch_start(integer total_number)
{
llSay(0, "Touched."
;requestid = llHTTPRequest("http://<dummy-ip>:8000", [HTTP_METHOD,"GET"], ""
;llSay(0, "ReqId: " + (string)requestid);
}
http_response(key request_id, integer status, list metadata, string body)
{
llSay(0, "ReqId: " + (string)request_id);
if (request_id == requestid)
{
llSay(0, "Status: " + (string)status + " : " + body);
} else
llSay(0,(string)status+" error"
;}
}
The outcome of this code is the two request id's which has the same value. And a line saying: Status: 0 :
Which means the status code that I get from the http request is 0??? According to the WIKI this status code should follow the HTTP specs. But there is no 0 status code in HTTP. It goes from 100 and up...
And the <dummy-ip> is just me removing the real IP so you hackers out there dont get itchy fingers *grins*
Anyone had any luck with this new function??? And if so...PLEASE post some code example

/Leto
