Skip to content

Commit

Permalink
Edit 'send_post_request' for Oasis
Browse files Browse the repository at this point in the history
  • Loading branch information
g-hyeong committed Oct 10, 2024
1 parent fc1e4cd commit e189ba0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions airflow/requirements/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ def send_post_request(platform, categoryId):
url = ""
if platform == 'HP':
url = os.getenv("HOMEPLUS_SERVICE_URL")
headers = {"Content-Type": "application/json"}
data = json.dumps({"category_id": categoryId})
response = requests.post(url, headers=headers, data=data)
elif platform == 'OA':
url = os.getenv("OASIS_SERVICE_URL")
headers = {"Content-Type": "application/json"}
data = json.dumps({"category_id": categoryId})
response = requests.post(url, headers=headers, data=data)
response = requests.post(url)

if response.status_code == 200:
print(f"Success: {response.json()}")
Expand Down

0 comments on commit e189ba0

Please sign in to comment.