Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it to possible to send a custom http header #65

Open
saurav28 opened this issue Mar 24, 2018 · 6 comments
Open

is it to possible to send a custom http header #65

saurav28 opened this issue Mar 24, 2018 · 6 comments
Labels
needs feedback Waiting for feedback of the author

Comments

@saurav28
Copy link

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

@sascha-egerer
Copy link
Contributor

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

@saurav28
Copy link
Author

saurav28 commented Apr 3, 2018

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

@sascha-egerer
Copy link
Contributor

I would say that this is not possible. Could you please explain why you would need that?

@saurav28
Copy link
Author

saurav28 commented Apr 3, 2018

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.

@saurav28
Copy link
Author

saurav28 commented Apr 3, 2018

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

@sascha-egerer
Copy link
Contributor

@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

@sascha-egerer sascha-egerer added the needs feedback Waiting for feedback of the author label Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs feedback Waiting for feedback of the author
Projects
None yet
Development

No branches or pull requests

2 participants