Jump to content

llHTTPRequest Body Missing?


Myshel Neiro
 Share

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

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

Recommended Posts

I have an existing lsl project that's has become too large and I'm trying to offload user storage and a variety of functions to an external server.  I'm sure I'm missing something but I cannot figure out what lsl is doing with the body parameter, as my server doesn't seem to be receiving it.

string body;
body = llJsonSetValue(body, ["toucherKey"], "0000-1111-fake");
llHTTPRequest("https://breakfreesl.com/api/dialog", [HTTP_BODY_MAXLENGTH, 16384, HTTP_METHOD, "POST"], body);

The endpoint is perfectly happy poking it with an identical body in Postman, and I've tried a couple other configurations, but I can't get the server to detect any body when coming from SL.

If anyone can plainly tell me why I'm an idiot, that would be much appreciated!

Edited by Myshel Neiro
  • Like 1
Link to comment
Share on other sites

llHTTPRequest("https://breakfreesl.com/api/dialog", [HTTP_BODY_MAXLENGTH, 16384, HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json"], body);

After poking around a bit more found my mistake.  The HTTP_MIMETYPE was unset.  Leaving question and answer here in case it helps anyone else.

  • Like 1
Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...