title: Jmeter POST call with Form data and application/x-www-form-urlencoded
body: <p>Need some help with Jmeter .</p>
  
  <p>Environment: Apache Jmeter 5.0 , Java 1.8, Mac OS High Sierra 10.13.6</p>
  
  <p>Problem outline:- Post call not getting 302 response with Location header(redirect) instead get 200 response without Location header</p>
  
  <p>The problem here is in Jmeter but same works in Postman.    In a Jmeter thread group I have cookie manager and couple of Get and Post calls. I set to save the cookie in user.properties file. 
   Scenario:- Login
  1) first do GET ( call with some query parameters) / login endpoint  will give  response cookie and csrf-token with 200 then next
  2) next do POST with form data (  in xxxform url encoded with csrf-token from get response ) + Cookie from get response from at / login endpoint  should return 302 with token is the expected result but getting 200 instead with no redirection  in Jmeter. In Postman able to get the desired results.</p>
  
  <p>When the same is replicated in Jmeter with same setting as performed in Postman results are not as expected</p>
  
  <p>Errors in Jmeter are:- 404 with location header missing or 200 with no Location response header</p>
  
  <p>But not 302 with Location response header</p>
  
  <p>With how many different combinations attempted.</p>
  
  <p>Attached <a href="https://www.experts-exchange.com/questions/29125837/Jmeter-POST-call-help.html" rel="nofollow noreferrer">my sample</a> TestPlans and Post request. Have also tried to place form data in Body instead in Parameters tab but have the same result. </p>
  
  <p>Thanking in advance! Appreciate anyone who could share their thoughts and rescue from this current issue.</p>
  
  <p><img src="https://i.stack.imgur.com/PWEIU.png" alt="enter image description here"></p>