Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
change request from get to post
Browse files Browse the repository at this point in the history
  • Loading branch information
sc15zs committed Jul 8, 2024
1 parent 5798ace commit 53f1c9d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/main/download_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from datetime import datetime
from enum import StrEnum
from typing import Any
from urllib.parse import urlencode

import requests
from flask import abort, current_app
Expand Down Expand Up @@ -248,11 +247,8 @@ def process_async_download(query_params: dict) -> int:
:param query_params: Query parameters for the API request.
:return: The status code of the API response.
"""
request_url = (
Config.DATA_STORE_API_HOST
+ "/trigger_async_download"
+ ("?" + urlencode(query_params, doseq=True) if query_params else "")
)
response = requests.post(request_url)

request_url = Config.DATA_STORE_API_HOST + "/trigger_async_download"
response = requests.post(request_url, data=query_params)

return response.status_code

0 comments on commit 53f1c9d

Please sign in to comment.