Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,12 +22,13 @@ headers = {
|
|
| 22 |
async def root():
|
| 23 |
return {"message": "990 API v1.0 running -- visit https://givingtuesday-annotated-990.hf.space/docs for usage"}
|
| 24 |
|
| 25 |
-
@app.get('/help/')
|
| 26 |
async def pass_docs_html():
|
| 27 |
async with httpx.AsyncClient(timeout=60.0) as client:
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
| 31 |
|
| 32 |
"""
|
| 33 |
# Use httpx to make an asynchronous GET request to the private API
|
|
|
|
| 22 |
async def root():
|
| 23 |
return {"message": "990 API v1.0 running -- visit https://givingtuesday-annotated-990.hf.space/docs for usage"}
|
| 24 |
|
| 25 |
+
@app.get('/help/', response_class=HTMLResponse)
|
| 26 |
async def pass_docs_html():
|
| 27 |
async with httpx.AsyncClient(timeout=60.0) as client:
|
| 28 |
+
response = await client.get(f"{api_url}/docs#/default/get_eins_eins__get", headers=headers)
|
| 29 |
+
html_content = response.text
|
| 30 |
+
print(f"DEBUG: {html_content}")
|
| 31 |
+
return HTMLResponse(content=html_content, status_code=200)
|
| 32 |
|
| 33 |
"""
|
| 34 |
# Use httpx to make an asynchronous GET request to the private API
|