Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Additional headers in config for HttpClient #181

Open
moonshadow565 opened this issue Dec 18, 2017 · 2 comments
Open

Additional headers in config for HttpClient #181

moonshadow565 opened this issue Dec 18, 2017 · 2 comments

Comments

@moonshadow565
Copy link

Would like something like WsClient's config.header for HttpClient that sets additional headers to be sent when connection is (re)opened :)

@eidheim
Copy link
Owner

eidheim commented Dec 19, 2017

Thank you, but do you have an example use case for this so I can understand the importance of such a feature?

@moonshadow565
Copy link
Author

I would use it with authorization header.
Currently i generate bunch of methods (roughly 2000) that take custom POD struct.
The struct has authorization header string saved as well as HttpClient class.
In generated methods i have to pass that header to each and every request.
I can't relay on the connection not being closed (keep-alive?) since there are both synch(prefered) and asynch methods being generated.
So just to be safe from such cases i pass the auth header to each and every request :)

That being said if there was such option it would make Simple-Web-Server more similar to Simple-WebSocket-Server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants