is it to possible to send a custom http header
Hi,
Is it possible to send a custom http header to the requests.
Something like AuthenticationProviders what we have in Java OpenCMIS .
Best Regards, Saurav
Should be possible. You can define them in the http invoker. See this example https://github.com/dkd/php-cmis-client/blob/master/examples/CreateFolder.php#L9 and the guzzle documentation http://docs.guzzlephp.org/en/5.3/clients.html
Thanks Sascha for the reply.
And how can i get hold of the response sent back from the request sent ? such that i can fetch a response header being sent from the server .
Best Regards, Saurav
I would say that this is not possible. Could you please explain why you would need that?
so, i need to connect a CMS server which exposes a csrf token in response header of the first request and then i need to pass this csrf in subsequent calls.
OpenCMIS and PortCMIS provides this through their AuthenticationProvider concept which can be plugged as a session parameter.
https://github.com/apache/chemistry-opencmis/blob/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/spi/AuthenticationProvider.java
@saurav28 You can inject the httpInvoker. I think this is what you need?! https://github.com/dkd/php-cmis-client/blob/master/examples/CreateDocument.php#L9