Reputation: 317
I'm using the Rest Client as below,
But every time I have the same error message
HTTP Error 400. The request has an invalid header name.
When I use the same config in postman client, (Content-Type:application/x-www-form-urlencoded) I've success message.
What I have to do ?
Upvotes: 0
Views: 2458
Reputation: 26
This might be somewhat reviving an old question, however:
In the headers tab on the Rest Client step the field column refers to a data field in your input stream to this step. The Name refers to the Name of the header. In the screenshot you've added you're trying to add a header called ${CONTENT_TYPE}
with the value as contained in your stream field content-type
.
Your first step appears to be a data grid. That grid needs to be supplying a field that you reference as your content-type
header. If it can't come from that grid you need to inject a step (something like Add Constant
) that will add the content-type
header.
Hope it helps.
Upvotes: 1