Can someone explain how to fix this problem, clearly it should not be happening. Corona should not assume I want to add charset to my Content-Type
If I set a header this way:
local headers = {} headers["Content-Type"] = "application/json" local body = '{"login":"test", "password":"test"}' local params = {} params.body = body params.headers = headers network.request( URL, "POST", loginCallback, params )
If I watch the packet with wireshark Corona is appending charset=UTF-8 to the end so it is actually sending
Content-Type: application/json; charset=UTF-8
but the server which I have no control over rejects the request as
Expert Info (Chat/Sequence): HTTP/1.1 415 Unsupported Media Type
How can I stop Corona from appending this, otherwise I cannot write a very important app as like I said I don’t have control of the server.
Also if I use curl or any REST client where I set the header it works flawlessly. but Corona will not let me send exactly the header I set?