I am doing a JSON POST via $.post(), but it seems it is changing my POST contents from JSON to Query string parameters.
I POST the following to the end-point:
$.post('/proxy/endpoint.json', { "query": {"test": true, "msg": "test" } });
The server handling the request shows the following logs:
ERROR - Bad POST params: query%5Btest%5D=true&query%5Dmsg%5Btest
Request flow:
JavaScript -> IIS Rewrite Proxy -> Nginx -> Java Server endpoint,
e.g. localhost:4000/endpoint.json
NOTE: I've tested the same POST request via Postman directly to IIS Server, which works fine. So it can only be my Jquery which is causing this problem.
Any tips on how I can improve this?