Content-type is always sending application/json


When setting the header of content-type to something specific, Gatling seems to be sending application/json along with it, which we don’t want.

Tried following the documentation on the website to set the content-type as application/json then specify something else entirely but it still sends application/json.

E.g. if we set the following:

we get the following response back:
Check header: Content-Type = application/javascript,application/json

This is working fine with Postman and Cucumber. Using the latest available version of Gatling too.


Crystal ball says you’re using asJSON to add a “Content-Type:application/json” header, then manually add a second one.

Thanks for that. That was exactly the problem. I did look for anything JSON specific but clearly was blind to that.