Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -396,7 +396,7 @@ async def sync_contacts(background_tasks: BackgroundTasks, sheeturl: str = Form(
|
|
| 396 |
return {"message": "Contacts processing completed."}
|
| 397 |
|
| 398 |
async def post_to_url(background_tasks: BackgroundTasks, url: str, json: dict):
|
| 399 |
-
async with httpx.
|
| 400 |
response = await client.post(url, json=json)
|
| 401 |
if response.status_code != 200:
|
| 402 |
logging.error(f"Unexpected response from Google Apps Script API: {response.status_code} - {response.text}")
|
|
|
|
| 396 |
return {"message": "Contacts processing completed."}
|
| 397 |
|
| 398 |
async def post_to_url(background_tasks: BackgroundTasks, url: str, json: dict):
|
| 399 |
+
async with httpx.AsyncClient(timeout=300.0, follow_redirects=True) as client:
|
| 400 |
response = await client.post(url, json=json)
|
| 401 |
if response.status_code != 200:
|
| 402 |
logging.error(f"Unexpected response from Google Apps Script API: {response.status_code} - {response.text}")
|