Jump to content

Did llHTTPRequest change? My map tile fetcher no longer works


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

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

Recommended Posts

Quote

gRequestZoom = llHTTPRequest(
        "http://api.gridsurvey.com/simquery.php",
        [HTTP_METHOD, "POST",HTTP_MIMETYPE,"application/x-www-form-urlencoded"],
        "region=" + llEscapeURL(llGetRegionName()) + "&item=objects_uuid")

 

I have used this line of code for years to fetch map tiles, however, recently it stop working and returns status 301.

If I simply type in a url in my browser, for example, https://api.gridsurvey.com/simquery.php?region=Kiva&item=objects_uuid  I get back the uuid of a map tile, so grid survey is apparently fine.

So what changed?

Link to comment
Share on other sites

Looks like a GridSurvey change.

This (your POST request) gets the "301 Moved Permanently" response, with the response body pointing to HTTPS instead:

llHTTPRequest(
    "http://api.gridsurvey.com/simquery.php",
    [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"],
    "region=" + "Kiva" + "&item=objects_uuid"
);

// <p>The document has moved <a href="https://api.gridsurvey.com/simquery.php">here</a>.</p>

You can fix it by changing http:// to https://

You should probably make a GET request instead, so llHTTPRequest will follow the redirect. This is what browsers do when you visit the HTTP URL.

llHTTPRequest(
    "http://api.gridsurvey.com/simquery.php?region=Kiva&item=objects_uuid",
    [HTTP_METHOD, "GET", HTTP_MIMETYPE, "application/x-www-form-urlencoded"],
    ""
);

 

Edited by Wulfie Reanimator
  • Thanks 4
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 84 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...