Tag Archives: jMeter

Posting a JSON request with JMeter

25 Nov

Some requests are quite straightforward to create with JMeter, some require a bit of googling; So here’s my quick how-to on sending a JSON Post request with JMeter:

1. Insert a HTTP Request Sampler as a child to your Thread Group

As usual, fill out the Path and the other bits and pieces you require in the HTTP Request
Plus:

  • Method: POST
  • Post Body: JSON request data

2. Insert a HTTP Header Manager as a child to your HTTP Request Sampler

  • Name: content-type
  • Value: application/json; charset=utf-8

And Run! – At this point you want to make sure that the response hasn’t returned any errors. You can do this with the View Results Tree Listener.

Easy.