Jump to content

HTTP request with custom headers


SubZeroWins
 Share

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

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

Recommended Posts

Hello, I read in the wiki that you can set custom headers for the http request. Its many days that I try to send a custom user agent but it never works as the script throws an error.

The script

llHTTPRequest("http://urlhere.com", [HTTP_USER_AGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36", HTTP_METHOD, "POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"], "Check=1")

 

And the error I get 

HTTP_USER_AGENT 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' is invalid

 

I really wonder if its possible at all.

Link to comment
Share on other sites

 llHTTPRequest("http://urlhere.com", [HTTP_CUSTOM_HEADER, "HTTP_USER_AGENT", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36", HTTP_METHOD, "POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"], "Check=1");

does not give a error.

Link to comment
Share on other sites

1 hour ago, SubZeroWins said:

Because the web server Im trying to fetch data from, appears to have blocked any requests made from in world.

Maybe they don't want you doing that?

If they really are blocking requests from LSL, they most likely are matching on the presence of the LSL version, which is included automatically and you cannot remove; see the wiki page

Quote

The user agent value is appended to the one generated by LSL 

Have you tried asking them?

Link to comment
Share on other sites

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