Skip to content
Myr

cookies system in place.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 5fe24ab · Browse files · 1 file+10 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−5 removed

  • other:+10 added−5 removed

1 file+10 added−5 removed

modified:requests/core.py+10 added-5 removed
280 unmodified lines
281 self.password = password282283284285def get(url, params={}, headers={}, auth=None):285def get(url, params={}, headers={}, cookies=None, auth=None):286 """Sends a GET request. Returns :class:`Response` object.287288 :param url: URL for the new :class:`Request` object.289 :param params: (optional) Dictionary of GET Parameters to send with the :class:`Request`.
6 unmodified lines
296 r.method = 'GET'297 r.url = url298 r.params = params299 r.headers = headers300 r.cookiejar = cookies301 r.auth = _detect_auth(url, auth)302 303 r.send()304 305 return r.response306307307def head(url, params={}, headers={}, auth=None):308def head(url, params={}, headers={}, cookies=None, auth=None):309 """Sends a HEAD request. Returns :class:`Response` object.310311 :param url: URL for the new :class:`Request` object.312 :param params: (optional) Dictionary of GET Parameters to send with the :class:`Request`.
7 unmodified lines
320 r.url = url321 # return response object322 r.params = params323 r.headers = headers324 r.cookiejar = cookies325 r.auth = _detect_auth(url, auth)326 327 r.send()328 329 return r.response330331330def post(url, data={}, headers={}, files=None, auth=None):332def post(url, data={}, headers={}, files=None, cookies=None, auth=None):333 """Sends a POST request. Returns :class:`Response` object.334335 :param url: URL for the new :class:`Request` object.336 :param data: (optional) Dictionary of POST Data to send with the :class:`Request`.
11 unmodified lines
348 if files:349 r.files = files350 351 r.headers = headers352 r.cookiejar = cookies353 r.auth = _detect_auth(url, auth)354 355 r.send()356 357 return r.response358 359 357def put(url, data='', headers={}, files={}, auth=None):360def put(url, data='', headers={}, files={}, cookies=None, auth=None):361 """Sends a PUT request. Returns :class:`Response` object.362363 :param url: URL for the new :class:`Request` object.364 :param data: (optional) Bytes of PUT Data to send with the :class:`Request`.
8 unmodified lines
373 r.method = 'PUT'374 r.data = data375 r.files = files376 r.headers = headers377 r.cookiejar = cookies378 r.auth = _detect_auth(url, auth)379 380 r.send()381 382 return r.response383384 381def delete(url, params={}, headers={}, auth=None):385def delete(url, params={}, headers={}, cookies=None, auth=None):386 """Sends a DELETE request. Returns :class:`Response` object.387388 :param url: URL for the new :class:`Request` object.389 :param params: (optional) Dictionary of GET Parameters to send with the :class:`Request`.
6 unmodified lines
396 r.url = url397 r.method = 'DELETE'398 399 r.headers = headers400 r.cookiejar = cookies401 r.auth = _detect_auth(url, auth)402 403 r.send()404
53 unmodified lines