0

I'm using the Rest Client as below,

Error

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 ?

luiz kava
  • 187
  • 1
  • 2
  • 14

1 Answers1

1

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.

CKE
  • 1,533
  • 19
  • 18
  • 29
Jacob
  • 26
  • 1