In Jmeter I am trying to send a post rest api request containing json in body and getting unsupported media 415

api, jmeter, json, rest

Solution

Just add a HTTP Header Manager to your Test Plan and configure it to send Content-Type header with the value of application/json

Check out Testing SOAP/REST Web Services Using JMeter article for more information on setting up a web service load test with JMeter

Problem

I am using Jmeter in order to send a request: ``` POST http://192.168.56.100:9080/agent/v1/target POST data: { "eventsServers":"192.168.56.100:9999", "targetType":"kafka" } ``` I am getting the following error: {"code":415,"message":"HTTP 415 Unsupported Media Type"} when I am running it from another rest api tool I am not getting this error what could be the problem ?

Original source

Related problems