Skip to content

Commit 64a447b

Browse files
committed
Fix lost url params issue
1 parent 8d9f263 commit 64a447b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

reqable/reqable.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@ def __init__(self, json):
712712
self._trailers = CaptureHttpHeaders(json.get('trailers'))
713713
from urllib.parse import urlparse
714714
url = urlparse('https://reqable.com' + json['path'])
715+
self._params = url.params
715716
self._path = url.path
716717
self._queries = CaptureHttpQueries.parse(url.query)
717718

@@ -812,10 +813,11 @@ def mime(self) -> Union[str, None]:
812813

813814
# Serialize the request fields to a dict.
814815
def serialize(self) -> dict:
815-
if len(self.queries) == 0:
816-
path = self.path
817-
else:
818-
path = self.path + '?' + self.queries.serialize()
816+
path = self.path
817+
if self._params != None and self._params != '':
818+
path = path + ';' + self._params
819+
if len(self.queries) != 0:
820+
path = path + '?' + self.queries.serialize()
819821
return {
820822
'method': self.method,
821823
'path': path,

0 commit comments

Comments
 (0)