How to pass information from REQMOD to RESPMOD?
- Keywords:
- Last updated by:
- Alex Rousskov
If your host application supports meta-information sharing among adaptation transactions, then you can use that feature to set a meta header in the REQMOD transaction and then receive that meta header in the RESPMOD transaction. Your adapter code can use the meta header value to tie different eCAP (and even ICAP!) transactions together (e.g., lookup some shared state in a global map using the meta header value as the key).
To "send" a meta header to the host application, your libecap:
Meta headers are not visible to HTTP clients and servers.
For example, if you are using Squid, see the adaptation_
For host applications that do not support meta-information sharing, the REQMOD transaction would have to add a custom HTTP header to the request so that the RESPMOD transaction can see it. Ideally, you would then configure your host application to remove that custom request header before it goes out to the origin server so that the information is not leaked outside the host application and your adaptation code.