Hunzla commited on
Commit
6ec32f5
1 Parent(s): 7b04bb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -53,21 +53,20 @@ transcript_only=["1","3","4"]
53
  col_names={'1':"name",'3':"address",'4':"order"}
54
  def send_data_to_db(menu_id,col_value,order_id):
55
  import requests
56
- print(menu_id)
57
  col_name=col_names[menu_id]
58
- # API endpoint URL
59
- url = 'https://pizzahut.softinfix.tech/api/save_order/'
60
- order_id="asdfghjk"
61
- # Data to send (in dictionary format)
62
- data = {
63
- col_name: col_value,
64
- "order_id":order_id
65
- }
66
 
67
- # Send POST request with data
 
 
 
 
68
  response = requests.post(url, data=data)
69
 
70
- # Print response
71
  print(response.status_code)
72
  print(response.text)
73
 
 
53
  col_names={'1':"name",'3':"address",'4':"order"}
54
  def send_data_to_db(menu_id,col_value,order_id):
55
  import requests
 
56
  col_name=col_names[menu_id]
57
+ # API endpoint URL
58
+ url = 'https://pizzahut.softinfix.tech/api/save_order?'+col_name+'='+col_value+"&order_id"+"="+order_id
59
+ payload = {}
60
+ headers = {}
 
 
 
 
61
 
62
+ response = requests.request("GET", url, headers=headers, data=payload)
63
+ # Data to send (in dictionary format)
64
+
65
+
66
+ # Send POST request with data
67
  response = requests.post(url, data=data)
68
 
69
+ # Print response
70
  print(response.status_code)
71
  print(response.text)
72