'How to hide HTTP Header Manager for a image upload post API in jmeter

I create two HTTP request, both post REST API. One of the API content-type is "application/json" for which I have added HTTP Header manager. My other API is for to upload the image. While running both APIs I am getting error as "400 Bad request". If I hide "Http header request" image upload API works but my another API which has json code that fails.



Solution 1:[1]

HTTP Header Manager obeys JMeter Scoping Rules so it's applied to all HTTP Request samplers in its scope

  • If you have HTTP Header Manager at the same level as HTTP Request samplers - it will be applied to all of them
  • If you put HTTP Header Manager to be a child of the HTTP Request sampler - it will be applied to this sampler only

like this:

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitri T