Srini V
Srini V

Reputation: 11355

How to setup HTTP Headers (Authorization) on REST POST method in Pentaho?

I need to setup HTTP headers (Authorization) on the REST Client (Post method) in Pentaho. But whenever I supply Field=Authorization and Name=Basic ASDFjfhnsdfjjfh34jbsdaAKJFasdfioHJ= in the headers section, it is not working properly.

Below is the error message

Error finding field [Authorization] in incoming stream!

Can some one please help?

Upvotes: 3

Views: 5208

Answers (2)

slybitz
slybitz

Reputation: 719

In order to accomplish this and pass authentication to the header, you have to add the Authorization request header to the "Generate Rows" step (which should be one of your first steps before your REST Client step) as another field. Then set the type to "String" and then the value to the actual authentication value. Then in the "REST Client" step, go to the Headers tab and add "Authorization" in BOTH the Name and Field columns for row 1, or click "Get Rows" and remove everything but header info that you need.

This could be WAY easier in my opinion but this is how you have to pass it in.

Upvotes: 2

Srini V
Srini V

Reputation: 11355

Found the trick. Pass on the Authorization header as a parameter to the REST Client. Then use that variable inside the Headers field. We cannot provide it directly since it expects them to be sent forward rather than initiated within the REST Client.

Upvotes: 3

Related Questions