Skip to content
Myr

core update

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 b72e1d1 · Browse files · 1 file+25 added−4 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+25 added−4 removed

  • other:+25 added−4 removed

1 file+25 added−4 removed

modified:requests/core.py+25 added-4 removed
7 unmodified lines
89 :copyright: (c) 2011 by Kenneth Reitz.10 :license: ISC, see LICENSE for more details.11"""1213import httplib14import urllib15import urllib216171819__title__ = 'convore'20__version__ = '0.0.1'21__build__ = 0x00000122__author__ = 'Kenneth Reitz'
20 unmodified lines
43 if not val.lower() in _METHODS:44 raise InvalidMethod()45 46 def send(self):44 pass45 set self.response()47 """Sends the request. """48 #set self.response49 # return True / False50 pass51 52 53class Response(object):54 """The :class:`Request` object. It's awesome.
18 unmodified lines
737475def get(url, params={}, headers={}, auth=None):76 pass77 # return response object7879def head(url, params={}, headers={}, auth=None):80 pass81 # return response object8283def post(url, params={}, headers={}, auth=None):84 pass85 # return response object86 87def put(url, data='', headers={}, auth=None):88 pass89 # return response object90 91def delete(url, params={}, headers={}, auth=None):92 pass93 # return response object949596def add_autoauth(url, authobject):97 global AUTHOAUTHS98 99 AUTHOAUTHS.append((url, authobject))100 101102103104class RequestException(Exception):105 """There was an ambiguous exception that occured while handling your request."""106107class AuthenticationError(RequestException):108 """The authentication credentials provided were invalid."""109 110class URLRequired(RequestException):111 """A valid URL is required to make a request."""112 93class InvalidMethod(Exception):94 """An innappropriate method was attempted."""113class InvalidMethod(RequestException):114 """An inappropriate method was attempted."""115