Forum Discussion
You can access certain headers from the request, for example:
- CONTENT_TYPE
- HTTP_ACCEPT
- HTTP_ACCEPT_ENCODING
- HTTP_DATE
- HTTP_USER_AGENT
- HTTP_REFERER
But not authorization.
If you’re not able to pass through the request body, I’m not sure there are a whole lot of other options.
The only other way I can think to do this is if there are a finite number of users. Then you could preconfigure REST Basic Auth accounts for those users and pass the account name as part of the request. Then in the pipeline you could dynamically set the account depending on the account name passed in.
Thanks for the reply and your suggestions . Could you please tell me what will be expression to access the header for ex. CONTENT_TYPE.
- tlikarish7 years agoEmployee
The HTTP request headers are passed as parameters to the pipeline and can be accessed like other pipe parameters. Here’s an expression that would allow you to access the content_type, note it’s just the name of the header in all caps with an underscore prepended to it.
_CONTENT_TYPE
For more information on how to use the triggered tasks, this documentation is useful.