Jmeter is giving response as 400, when posting request with data

Viewed 61

it is sending post data as

$__eval($__{FileToString("json file path ",,)})

With no cookies

Response code 400

2 Answers

Use Menu option :

  • Tools > Function Helper Dialog

to fix your syntax as it is incorrect it should look like:

 ${__eval(${__FileToString(json file path,,)})}

Add a view result tree and check the request tab yo see if you are sending correctly data.

If yes, then check you are sending correct Content-Type header by adding a Header Manager and adding header:

 Content-Type : application/javascript 

if it’s JSON or another value

Related