-
Notifications
You must be signed in to change notification settings - Fork 46
Custom Headers option #10
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
Open
alaptseu
wants to merge
27
commits into
prisma-labs:master
Choose a base branch
from
alaptseu:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
urllib2 doesn't exist within python3. The proposed changes should be compatible with python2 and 3, tested on 2.7.13 and 3.6.0.
OK this works in python 2 and python 3. However in python 2 it returns a unicode type and in python 3 a string class. It is also dependent on six.moves, so a dependency for six will need to be added. Using six is the easiest way to deal with urllib2 changes form Python2 to Python3. I can use the requests library if you guys prefer. I tested this against my own Gcool endpoint. These IDs will be deleted so I don't mind them in the public view. Python 3 returned: {"data":{"allDevices":[{"id":"cj65hnfrr34u00135z8l3glfq"},{"id":"cj65jm5kr3n6101350sfhk58t"},{"id":"cj65mdwpx0art0152rydd3yzy"},{"id":"cj65mg1sy0aum01529ro6x9h6"},{"id":"cj65mg6s30aut0152irb5j1th"}]}} The type is <class 'str'> Python 2 returned: {"data":{"allDevices":[{"id":"cj65hnfrr34u00135z8l3glfq"},{"id":"cj65jm5kr3n6101350sfhk58t"},{"id":"cj65mdwpx0art0152rydd3yzy"},{"id":"cj65mg1sy0aum01529ro6x9h6"},{"id":"cj65mg6s30aut0152irb5j1th"}]}} The type is <type 'unicode'>
Fixed to support python 3
User should be able to compose their own authorization header. For example AWS API Gateway using Cognito User Pool can not check Authorization header token which has Bearer
fix: Remove Bearer from Authorization header
Add inject_token example to README
Increment version, add long description, and edit author
Update setup.py for PyPI
Also add language to previous code block for syntax highlighting on GH.
Allow the authorization header name to vary
palantir0
pushed a commit
to palantir0/python-graphql-client
that referenced
this pull request
Jan 26, 2020
…lient into alaptseu-master Resolve minor conflicts with updates from alaptseu PR prisma-labs#10
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.
No description provided.