Http Service sends wrong context application type

I created a HTTP remote service through the open source DreamFactory. I encountered a major problem when testing the application.

When I directly send GET and POST requests to the service (not through DF) the context type received is the correct one : application/json

However, when I send the same request via the DF, the context type received is application/x-www-form-urlencoded.

It’s causing problems with my application since it expects application/json type of request. How can I fix that?

Hi @dx4

It is because the keys and values are encoded in key-value tuples separated by '&' , with a '=' between the key and the value when you send it via DreamFactory.

In your GET/POST requests, you can add an additional header field called ‘content-type’ and set the value to application/json. That should work.

KEY - content-type
VALUE - application/json