Rest API - GET request with body content


I am using Gatling to test REST API.

One type of requirement is GET request with body content. while testing using Gatling 3.3.1, getting below error. Please suggest and thank you for your time

{“errorMessage”:“Unable to generate response as per Accept headers in request.”,“errorCode”:“406.031.001”},


This has nothing to do with GET + body.
The error message is pretty clear: you haven’t set an Accept request header and your API requires one.

Hi Stephane,

Thanks for your time. I have rechecked, all headers provided properly(and the same set working fine in postman). Any issue in providing header/header value?
.headers(Map(“Content-Type” → “application/stream+json”))

Thanks and Regards,
Sakthivel Raja V

Your API is complaining about the Accept header, not the Content-Type one.

No known issue there.
And impossible to investigate if you don’t provide a reproducer.

You might want to check your REQUEST HEADER and add what kind of content request accepts , something like this :