Closed botder closed 1 year ago
Which resource(s) have this problem? ajax
Describe the bug The ajax resource is using Content-Type application/x-www-form-urlencoded instead of application/json when sending JSON data in the request body. The embedded web server parses the JSON data as if it were a bunch of key=value pairs.
application/x-www-form-urlencoded
application/json
https://github.com/multitheftauto/mtasa-resources/blob/3e4e3a4b8c3bf554b2d2b71ea987dc6ffec3be2b/%5Bweb%5D/ajax/ajax.js#L90
To Reproduce Inspect the http traffic when browsing the MTA server's web server.
Expected behavior Ajax uses application/json.
Which resource(s) have this problem? ajax
Describe the bug The ajax resource is using Content-Type
application/x-www-form-urlencoded
instead ofapplication/json
when sending JSON data in the request body. The embedded web server parses the JSON data as if it were a bunch of key=value pairs.https://github.com/multitheftauto/mtasa-resources/blob/3e4e3a4b8c3bf554b2d2b71ea987dc6ffec3be2b/%5Bweb%5D/ajax/ajax.js#L90
To Reproduce Inspect the http traffic when browsing the MTA server's web server.
Expected behavior Ajax uses
application/json
.