'Perform an HTTP request
@raises Exception: Any exception that can be raised by httplib2
@see: C{L{HTTPFetcher.fetch}}'

def fetch(self, url, body=None, headers=None):

    if body:
        method = 'POST'
    else:
        method = 'GET'
    if (headers is None):
        headers = {}
    if (not (url.startswith('http://') or url.startswith('https://'))):
        raise ValueError(('URL    is    not    a    HTTP    URL:    %r' % (url,)))
    (httplib2_response, content) = self.httplib2.request(url, method, body=body, headers=headers)
    try:
        final_url = httplib2_response['content-location']
    except KeyError:
        assert (not httplib2_response.previous)
        assert (httplib2_response.status != 200)
        final_url = url
    return HTTPResponse(body=content, final_url=final_url, headers=dict(httplib2_response.items()), status=httplib2_response.status)
