aspgvu
commited on
Commit
·
05e4ef7
1
Parent(s):
57b6df6
query string instead of body
Browse files
app.py
CHANGED
|
@@ -2,12 +2,11 @@ import gradio as gr
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
reboot = None
|
| 5 |
-
url = 'https://example.com/api/endpoint' # Replace with the actual API endpoint URL
|
| 6 |
|
| 7 |
-
def send_request(
|
| 8 |
while True:
|
| 9 |
try:
|
| 10 |
-
response = requests.post(url,
|
| 11 |
|
| 12 |
if response.status_code == 200:
|
| 13 |
print(f"POST request successful!\n{response.json()}")
|
|
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
reboot = None
|
|
|
|
| 5 |
|
| 6 |
+
def send_request(params, url):
|
| 7 |
while True:
|
| 8 |
try:
|
| 9 |
+
response = requests.post(url, params=params)
|
| 10 |
|
| 11 |
if response.status_code == 200:
|
| 12 |
print(f"POST request successful!\n{response.json()}")
|