Jump to content

llHttpRequest with Content-Type header


DaveDurant
 Share

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

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

Recommended Posts

Hi,

I'm trying to do a POST with llHttpRequest and need to set a HTTP_CUSTOM_HEADER for a specific Content-Type. 

When I try this, I get a script error: HTTP_CUSTOM_HEADER value is an invalid header. 

ContentType and Content_Type do not produce this script error. Just "a-b" does not have the error either, so I think this is something looking explicitly at Content-Type. 

Any tips? I don't control the server side and it wants a Content-Type. 

Link to comment
Share on other sites

HTTP_MIMETYPE does set the Content-Type header sent from llHTTPRequest. also HTTP_METHOD must be "POST" for a Content-Type header to be sent at all. i checked the transmitted headers just now, to make sure this behavior has not changed.

you have kept your test script and any discription of the remote server secret, so it won't be possible to offer more than that general information.

 
Link to comment
Share on other sites

Huh.. You are indeed correct - sorry, I didn't thoroughly retest. My bad. 

The script is trying to do an OAuth 2 login to a CRM system. Google says, and says only, that the error I'm getting means it's missing the correct Content-Type header in the POST. I changed the URL http://httpbin.org/post and the right headers are in there. 

Weird. Time for more digging, I guess. TY!

Link to comment
Share on other sites

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