There are many samplers that JMeter provides but I am willing to bet that the HTTP Request samplers is the most frequently used and, in this Blog Post, we are going to look at how this works and how it can be configured.
Before we look at the sampler lets look at the option available to us in the HTTP Request drop down, while you probably don’t need to understand these in order to test you application using JMeter it can be useful.
These request methods indicate the action to be taken on the resource specified in the Web Server section of the sampler and are sometimes referred to as HTTP verbs, these are defined by The World Wide Web Consortium (W3C). W3C is the main international standards organisation for the World Wide Web.
There are 5 main methods used in modern API’s these are:
|The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
|The PATCH method is used to apply partial modifications to a resource.
|The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
|The PUT method replaces all current representations of the target resource with the request payload.
|The DELETE method deletes the specified resource.