[Python] Support _preload_content flag in python client#4166
Merged
wing328 merged 2 commits intoswagger-api:masterfrom Nov 10, 2016
Merged
[Python] Support _preload_content flag in python client#4166wing328 merged 2 commits intoswagger-api:masterfrom
wing328 merged 2 commits intoswagger-api:masterfrom
Conversation
Contributor
|
@mbohlool thanks for the contribution. If it's not too much to ask, do you mind adding a test case for cc @scottrw93 |
3 tasks
Contributor
Author
This was referenced Nov 11, 2016
davidgri
pushed a commit
to davidgri/swagger-codegen
that referenced
this pull request
May 11, 2017
* Modify python client templates to support _preload_content flag * Update python petstore
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR
In order to support streaming responses, we need the API Client not to read response content and return a Response object. urllib3 has a flag called preload_content that if set to False, it will return a urllib3.HTTPResponse. This PR add support for this flag in rest client and api client and generated api classes. The flag is optional and defaulted to True to keep current behavior.