How to obtain a response header value in a data stream action?

arielgritti
Mega Sage

Hi community,

 

I'm configuring a data stream action in Flow Designer. I'm stuck in the "pagination step".

How can I obtain a response header value?

 

The scenario is:

In the REST step, the answer from the external system has a "token" to know if is there more data to retrieve. The response header is called "x-foundation-continuation" (see an extract of the JSON answer)

 

arielgritti_0-1687620178682.png

 

The FD step execution runtime is showing it:

arielgritti_1-1687620388400.png

 

I need to use this value to change to true/false the getNextPage (read-only) variable in the pagination step, but I can't get it.

 

In this step (pagination) the two available variables are: variables and pageResponse. I'm trying using pageResponse but it seems empty.

arielgritti_0-1687621085525.png

 

The option to obtain it from the Response Body doesn't cover the need here, because the value is coming in the Response Header. 

I tried to do it like this; it doesn't works too.

 

arielgritti_0-1687621507666.png

 

 

Any help is welcome.

Thanks,

Ariel

 

 

5 REPLIES 5

Hi @User279787 

 

My " real code" is: 

moreData = pageResponse.response_headers['x-foundation-continuation'];

 

The "answer" is (I'm validating the answer using Postman too; not only in Flow Designer action builder)

arielgritti_0-1688650629666.png

 

No typo; No brackets or parenthesis typo/syntax error; No Upper/lower case;

And it still doesn't work! 😞

 

Thanks for your revision of my post.

Ariel