Skip to content

Commit

Permalink
Typo in documentation
Browse files Browse the repository at this point in the history
The kwarg is named `headers`, not `header`. Also, its a dict, not a set.
  • Loading branch information
sharat87 committed Jan 1, 1970
1 parent 9471b0a commit 5e6ecda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/user/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Sessions can also be used to provide default data to the request methods::
with requests.session(auth=auth, headers=headers) as c:

# both 'x-test' and 'x-test2' are sent
c.get('http://httpbin.org/headers', header={'x-test2', 'true'})
c.get('http://httpbin.org/headers', headers={'x-test2': 'true'})


.. admonition:: Global Settings
Expand Down

3 comments on commit 5e6ecda

@anatolyborodin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"git fsck" is not happy about this commit:

error in commit 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: invalid author/committer line - bad time zone

@kennethreitz @sharat87 would it be possible to repair the history with "git replace" & "git filter-branch". I know, "public history", but is it good to keep a broken commit?

@sigmavirus24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not possible to repair the history without rewriting all history since: /~https://github.com/kennethreitz/requests/issues/2690

@twirrim
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is breaking git pulls in fun ways

$ git submodule update --init --recursive
Cloning into '/Users/pgraydon/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests'...
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed
fatal: clone of '/~https://github.com/kennethreitz/requests' into submodule path '/Users/pgraydon/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests' failed
Failed to clone 'third_party/requests'. Retry scheduled
Cloning into '/Users/pgraydon/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests'...
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed
fatal: clone of '/~https://github.com/kennethreitz/requests' into submodule path '/Users/pgraydon/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests' failed
Failed to clone 'third_party/requests' a second time, aborting
Failed to recurse into submodule path 'third_party/ycmd'

Please sign in to comment.