0
votes

In POSTMAN when i POST a URL with Headers with Body data it is working fine and getting Response as 200,but when i POST the same in J meter HTTP API request i am receiving the following Error.

Headers size in bytes: 124 Body size in bytes: 54 Sample Count: 1 Error Count: 1 Data type ("text"|"bin"|""): text Response code: 404 Response message: Resource Not Found

1
Please share the request infoMasud Jahan

1 Answers

0
votes

If you're sending the same requests you should be getting the same responses. HTTP Status Code 404 means that URL path is not correct so you need to check the path of your URL as most probably there is a difference there. Even non-printable characters which you cannot see in JMeter GUI are encoded into their equivalents so whitespace becomes %20 so pay attention to literally everything.


In any case given you can successfully execute the request in Postman it means that you can record it using JMeter's HTTP(S) Test Script Recorder

  1. Prepare JMeter for recording, the easiest way is using JMeter Templates Feature

    enter image description here

    once JMeter creates a Test Plan for your - expand and start the HTTP(S) Test Script Recorder

  2. Prepare Postman for recording, configure it to use JMeter as the proxy:

    enter image description here

  3. Run your request in Postman

  4. That's it, JMeter should capture the request and save it under the Recording Controller along with the HTTP Header Manager containing corresponding request headers