mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
lets make url the actual url instead of just the path
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
class Request(object):
|
||||
|
||||
def __init__(self, host, port, method, url, body, headers):
|
||||
def __init__(self, host, port, method, path, body, headers):
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.method = method
|
||||
self.url = url
|
||||
self.path = path
|
||||
self.body = body
|
||||
self.headers = frozenset(headers.items())
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
return self.host + self.path
|
||||
|
||||
def __key(self):
|
||||
return (self.host, self.port, self.method, self.url, self.body, self.headers)
|
||||
return (self.host, self.port, self.method, self.path, self.body, self.headers)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.__key())
|
||||
|
||||
Reference in New Issue
Block a user