Question
Passing Header properties in Rest Service Response
Hi All,
We need to set some header Parameters for Rest Service Response. It's a cloud based application with very high volume ( 2000 transactions per sec)
We were wondering what is the best option for it.
1. Set Header in Response tab of the service rule
2. Configure the Header at the Server layer
3. Any Other?
These are the headers we need to set
Access-Control-Allow-Credentials
Access-Control-Allow-Methods
Access-Control-Allow-Origin
Content-Encoding
Content-Type
Connection
P3P
Pragma
Transfer-Encoding
It depends on your requirements / need.
* If your response headers are generic, would not change across different rest services and if you would like to minimize modification / maintenance deployment of application rules to incorporate any future changes - Having the response headers set at the Webserver makes more sense.
* However, if you need fine grain control of the headers across various REST services, the headers are different across different services and if you would like to map values dynamically from the Pega clipboard then - Having the response headers in the REST service rule-form's response tab makes more sense.