Getting REST API headers in process running on Workbench

Avatar

Avatar
Establish
Level 2
manu-gupta
Level 2

Likes

4 likes

Total Posts

33 posts

Correct reply

1 solution
Top badges earned
Establish
View profile

Avatar
Establish
Level 2
manu-gupta
Level 2

Likes

4 likes

Total Posts

33 posts

Correct reply

1 solution
Top badges earned
Establish
View profile
manu-gupta
Level 2

07-10-2019

Hi,

Did anyone try pulling REST API Request headers in process as process variable?

I have created process in Workbench where we are consuming JSON as body input and passing few business specific header request params. I want to retrieve those header and log in server.log when process is invoked?

Any pointers

AEM 6.2 on JBOSS

WorkBench 6.2

Manu

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Establish
Level 2
manu-gupta
Level 2

Likes

4 likes

Total Posts

33 posts

Correct reply

1 solution
Top badges earned
Establish
View profile

Avatar
Establish
Level 2
manu-gupta
Level 2

Likes

4 likes

Total Posts

33 posts

Correct reply

1 solution
Top badges earned
Establish
View profile
manu-gupta
Level 2

18-10-2019

do you have any script handy to handle this usecase. essentially I need to check the header request and extract to our process.

I tried creating custom component with method having arguments as Object of HttpServletRequest request type. But I am not sure how to capture it.

Appreciate your response here.

Manu

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,153 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,153 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

08-10-2019

whatever you want to print in logs, use execute script service operation and put it in

System.out.println. You can call variables as well in the execute script using XPath.

Adobe LiveCycle ES4 * Creating XPath expressions