Getting REST API headers in process running on Workbench | Community
Skip to main content
manu-gupta
Level 4
October 7, 2019
Question

Getting REST API headers in process running on Workbench

  • October 7, 2019
  • 2 replies
  • 2328 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Mayank_Gandhi
Adobe Employee
Adobe Employee
October 8, 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

manu-gupta
Level 4
October 18, 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