Hi, I think that the problem is related either with the Content-Type parameter (but it seems to be ok on your code) or the payload being set to the request, that is not in JSON format (I cannot see the code where you set the payload)
I suggest you to debug your HTTP request by using an online service like this: https://requestcatcher.com/, in order to debug the actual request you are sending to the server. Just change the request URL by the URL you generate in this service. Then let us know 