Skip to content

Commit e189ba0

Browse files
committed
Edit 'send_post_request' for Oasis
1 parent fc1e4cd commit e189ba0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

airflow/requirements/modules.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ def send_post_request(platform, categoryId):
3434
url = ""
3535
if platform == 'HP':
3636
url = os.getenv("HOMEPLUS_SERVICE_URL")
37+
headers = {"Content-Type": "application/json"}
38+
data = json.dumps({"category_id": categoryId})
39+
response = requests.post(url, headers=headers, data=data)
3740
elif platform == 'OA':
3841
url = os.getenv("OASIS_SERVICE_URL")
39-
headers = {"Content-Type": "application/json"}
40-
data = json.dumps({"category_id": categoryId})
41-
response = requests.post(url, headers=headers, data=data)
42+
response = requests.post(url)
4243

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

0 commit comments

Comments
 (0)