:copyright: (c) 2011 by Kenneth Reitz.
:license: ISC, see LICENSE for more details.
"""
+
+import httplib
import urllib
import urllib2
+
__title__ = 'convore'
__version__ = '0.0.1'
__build__ = 0x000001
raise InvalidMethod()
def send(self):
- pass
- set self.response()
+ """Sends the request. """
+ #set self.response
# return True / False
+ pass
class Response(object):
def get(url, params={}, headers={}, auth=None):
pass
+ # return response object
def head(url, params={}, headers={}, auth=None):
pass
+ # return response object
def post(url, params={}, headers={}, auth=None):
pass
+ # return response object
def put(url, data='', headers={}, auth=None):
pass
+ # return response object
def delete(url, params={}, headers={}, auth=None):
pass
+ # return response object
def add_autoauth(url, authobject):
AUTHOAUTHS.append((url, authobject))
+
+
+
+class RequestException(Exception):
+ """There was an ambiguous exception that occured while handling your request."""
+
+class AuthenticationError(RequestException):
+ """The authentication credentials provided were invalid."""
+
+class URLRequired(RequestException):
+ """A valid URL is required to make a request."""
-class InvalidMethod(Exception):
- """An innappropriate method was attempted."""
\ No newline at end of file
+class InvalidMethod(RequestException):
+ """An inappropriate method was attempted."""
+
\ No newline at end of file