Skip to content

Commit

Permalink
use params
Browse files Browse the repository at this point in the history
  • Loading branch information
k1000dai committed Nov 25, 2024
1 parent 4cafc2b commit d91fc27
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 @@ -105,7 +105,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 @@ -115,7 +115,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 d91fc27

Please sign in to comment.