Commit Graph

75 Commits

Author SHA1 Message Date
Cory Benfield 0792acc130 Update documentation on Sessions.
This resolves issue #870. Better documentation here should be considered
for further work.
2012-11-17 10:57:26 +00:00
Ian Cordasco 8081d7b15c Fixes #817.
Use dicts and lists where necessary but accept both dicts and lists of
2-tuples everywhere.
2012-09-02 23:10:28 -04:00
Andrew Tolbert f18733d2be Fix for #804 - Session params ommited in 0.13.8. If default_kwarg is a list, attempt to convert to dictionary 2012-08-22 09:49:40 -05:00
Ian Cordasco ab56e4a9f1 Fix python3 tests.
I wasn't thorough enough with how I dealt with headers. Most of the header
logic in the Request object utilizes dictionary properties which will not work
with a key/value list.

I'll dig more into this, but I know the rest of the features are more
important so I'll take my time on this and send a separate pull request.
2012-08-18 14:41:13 -04:00
Ian Cordasco e02da89337 Merge branch 'develop' into key_val_lists
Conflicts:
	requests/models.py
	tests/test_requests.py

Remove some of Lukasa's duplication of my efforts in _encode_data.
2012-08-18 12:15:03 -04:00
Locker537 42d0a2169e Whitespace fixes following PEP8. 2012-08-16 17:38:35 -04:00
Ian Cordasco ceec572cb9 Merge branch 'develop' into key_val_lists
Conflicts:
    requests/models.py
2012-08-07 12:11:15 -04:00
Shivaram Lingamneni 3c0b94047c address connection leak issue from #520
* prefetch now defaults to True, ensuring that by default, sockets
  are returned to the urllib3 connection pool on request end
* sessions now have a close() method, notifying urllib3 to close pooled
  connections
* the module-level API, e.g., `requests.get('http://www.google.com')`,
  explicitly closes its session when finished

When prefetch is False, the open socket becomes part of the state of the
Response object, and it's the client's responsibility to read the whole
body, at which point the socket will be returned to the pool.
2012-08-05 21:09:13 -07:00
Ian Cordasco 1722f28971 Add to_key_val_lists to avoid repetition.
It uses the same logic whenever we're trying to use a list of key values and
avoid what I had started doing -- using the same pattern everywhere.

proxies, and headers should both be covered by this commit.
2012-08-05 23:29:10 -04:00
Ian Cordasco 2d5e38f30a params now accepts a k/v list.
Also added test for params accepting k/v lists.
2012-08-03 22:24:52 -04:00
Arup Malakar b28673368b Issue #505: Changed the store_cookie configuration to be part of the config dict, instead of being a new argument 2012-05-23 14:12:18 -07:00
Kenneth Reitz 4cf31b0b86 authors 2012-05-16 17:09:43 -07:00
Arup Malakar c501784541 Issue #505: Allow disabling of cookie persistence/sending 2012-05-16 15:07:15 -07:00
Suraj Barkale 973e9cb548 Remove sharing of base_headers config between sessions.
Since base_headers is a dictionary, it's reference was shared with all instances of
Session objects. Using deepcopy here should not incur large performance penalty.
2012-05-15 19:47:02 +05:30
Roman Haritonov 33f1087584 Move session cookie saving from Session.request() to Request._build_response() 2012-05-08 13:02:39 +04:00
Shivaram Lingamneni 9bf53676b8 fix crash in safe mode when response.cookies is None 2012-05-03 01:29:12 -07:00
Shivaram Lingamneni 4d6871d917 Further changes to move cookies to CookieJar 2012-05-01 17:00:19 -07:00
miguel c4ab96b638 mostly complete cookie support based on cookiejar 2012-05-01 17:00:19 -07:00
Idan Gazit 632d9893b0 Improve docstring description of auth parameter 2012-05-01 06:20:52 -04:00
Roman Haritonov d569a2d6bc fix #549 Add 'prefetch' to Session.__attrs__ and Requests.__init__ 2012-04-13 19:25:10 +04:00
Kenneth Reitz dacc1d8aaf default to true for redirects now, since safe 2012-03-30 23:42:04 -04:00
Ian Danforth 44277441d6 Sphinx throws an error if you don't escape ** in **kwargs 2012-03-18 18:11:15 -07:00
Kenneth Reitz 093709be4d Merge branch 'develop' of https://github.com/chadnickbok/requests into develop 2012-03-14 20:27:07 -04:00
chadnickbok@gmail.com fc618aa78a Updated Requests api to accept a 'cert' argument.
This argument can be either a string, containing the path to a
pem-formatted key and certificate chain, or a tuple of (cert, key).

When supplied a tuple, the values are paths to an SSL certificate
chain file and key, respectively.
2012-03-14 17:15:29 -07:00
chadnickbok@gmail.com 82e69de44f Exposed key_file and cert_file in requests, to support https client certificates. 2012-03-14 15:57:30 -07:00
Kenneth Reitz 29309201b6 remove cruft 2012-03-13 16:44:45 -07:00
Kenneth Reitz 0dd6c40205 dict sequence 2012-03-13 16:42:16 -07:00
Kenneth Reitz 84d9a1b577 dict_to_sequence 2012-03-13 16:39:51 -07:00
Brendan Maguire ca45da39fa Removed prefetch from args. 2012-02-28 20:16:01 +00:00
Brendan Maguire 97815c9930 Prefetch for sessions 2012-02-28 20:02:21 +00:00
Kenneth Reitz 2f33679cb3 spacing 2012-02-20 15:35:02 -05:00
Kenneth Reitz 709828204a HEADs don't follow redirects by default. 2012-02-20 13:56:11 -05:00
Shrikant Sharat 590ce29743 Implemented #439. Added supporting test. 2012-02-19 15:11:19 +05:30
Kenneth Reitz b0e2e4f284 blah 2012-01-23 00:15:25 -05:00
Kenneth Reitz 7fdb541e2d make it true 2011-12-28 04:48:27 -05:00
Kenneth Reitz 9fcfec18da ssl docs 2011-12-28 03:18:40 -05:00
Kenneth Reitz f7e67c01ea only use session verify when not modified 2011-12-28 02:57:36 -05:00
Kenneth Reitz 0a8bb2e1b3 verification support in sessions 2011-12-28 02:51:42 -05:00
Nick Hatch a6412b02ba Fix spelling errors, typos. 2011-12-11 01:58:55 -06:00
Rolando Espinoza La fuente c165255e98 use session's hooks as defaults for every requests. 2011-11-18 18:19:27 -04:00
Kenneth Reitz ec926a4958 test fix 2011-11-12 16:46:53 -05:00
Kenneth Reitz 3fccf63f49 stylee 2011-11-12 12:58:46 -08:00
Kenneth Reitz 6a23625c11 give Request session reference for parameter+redirects 2011-11-12 12:57:32 -08:00
Kenneth Reitz f1e8700e9a consistiency 2011-11-12 12:51:30 -08:00
Kenneth Reitz 02408973c6 keep-alive as config option only
better defaults
2011-11-12 12:47:11 -08:00
Kenneth Reitz 220f687e6f Merge branch 'develop' of https://github.com/jbrendel/requests into develop
Conflicts:
	AUTHORS
	requests/__init__.py
2011-11-09 22:15:54 -08:00
Kenneth Reitz 0c4342a3a6 prefetching on all methods 2011-11-09 17:47:19 -08:00
Kenneth Reitz 5b73f2ea61 infos 2011-11-09 15:43:54 -08:00
Kenneth Reitz 358478eb88 Cookie persistence! 2011-11-09 14:57:38 -08:00
jbrendel 73ba48be2e Added support for OPTIONS method. 2011-11-08 12:31:18 +13:00