Skip to content

Commit

Permalink
Merge pull request #99 from k1000dai/dev/fix_quote
Browse files Browse the repository at this point in the history
FIX:Does not support quotes in the query string #98
  • Loading branch information
danielnsilva authored Dec 8, 2024
2 parents bdae644 + d91fc27 commit 5b94684
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions semanticscholar/ApiRequester.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async def _get_data_async(
payload: dict = None
) -> Union[dict, List[dict]]:

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

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

async with httpx.AsyncClient() as client:
r = await client.request(
method, url, timeout=self._timeout, headers=headers,
method, url, params=parameters,timeout=self._timeout, headers=headers,
json=payload)

data = {}
Expand Down

0 comments on commit 5b94684

Please sign in to comment.