Skip to content

Commit 5b94684

Browse files
authored
Merge pull request #99 from k1000dai/dev/fix_quote
FIX:Does not support quotes in the query string #98
2 parents bdae644 + d91fc27 commit 5b94684

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

semanticscholar/ApiRequester.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def _get_data_async(
106106
payload: dict = None
107107
) -> Union[dict, List[dict]]:
108108

109-
url = f'{url}?{parameters.lstrip("&")}'
109+
parameters=parameters.lstrip("&")
110110
method = 'POST' if payload else 'GET'
111111

112112
logger.debug(f'HTTP Request: {method} {url}')
@@ -116,7 +116,7 @@ async def _get_data_async(
116116

117117
async with httpx.AsyncClient() as client:
118118
r = await client.request(
119-
method, url, timeout=self._timeout, headers=headers,
119+
method, url, params=parameters,timeout=self._timeout, headers=headers,
120120
json=payload)
121121

122122
data = {}

0 commit comments

Comments
 (0)