PlayMaker Feedback > Action Requests
WWWPOST + Header
(1/1)
GPVFX_SB:
Hi Playmakers,
I'm setting up my backend via an IBM Cloudant but am getting a 415 Unsupported media type HTTP response
Would it be possible to add a "Content-Type: application/json" header to WWWPOST?
REFS:
https://www.ibm.com/support/knowledgecenter/en/SSHJB3_6.2.0/com.ibm.curam.content.doc/MSDK/tshoot_415_unsupported_media_type_response.html
https://www.codeproject.com/Articles/1111863/IBM-Cloudant-HTTP-API-in-a-Nutshell
PlaymakerNOOB:
Bump.
I've occasionally wanted to test something inside playmaker and not python and getting header info is necessary.
jeanfabre:
Hi,
unfortunatly, WWW class is really plain bad and broken in most Unity versions one way or another.
https://forum.unity.com/threads/wwwform-with-binary-field-as-byte-array-form-parameter-issue.343847/
I don't recommend using the WWW class for anything complex and instead rely on a proper implementation from a thirdparty or custom.
what version of Unity are you working on?
I would go and try the c# httpwebrequest for a start https://docs.microsoft.com/en-us/dotnet/api/system.net.httpwebrequest?redirectedfrom=MSDN&view=netframework-4.7.2
Bye,
Jean
GPVFX_SB:
Hi Jean,
Thanks very much for the additional documentation (and all your continued efforts). I'll do more research and some experimentation with IBM "App Connect" which has a "Web Request" option as well and utilize "Easy Save" for the structured data. I'm currently developing on Unity 2018.2.1f1.
jeanfabre:
Hi,
let me know how it goes, if you find a good solution, I'd be willing to see if I can port this into actions.
Bye,
Jean
Navigation
[0] Message Index
Go to full version