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

documentation does not indicate how to pass global headers #220

Open
phishy opened this issue May 3, 2016 · 1 comment
Open

documentation does not indicate how to pass global headers #220

phishy opened this issue May 3, 2016 · 1 comment
Labels

Comments

@phishy
Copy link

phishy commented May 3, 2016

I would like Accept: application/json to be passed with every model call. Adding a produces key to the swagger.json does not seem to do the trick. Adding request_headers to SwaggerClient.from_url only seem to work for the call to retrieve the JSON.

What's the best way to pass global headers?

@analogue
Copy link
Contributor

Wrap SwaggerClient to return a wrapped Resource that injects the headers via _request_options when the service call is made.

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

No branches or pull requests

2 participants