I have a python application running on my localhost:3978. Is it possible to make an api call to http://localhost:3978/api/users from http://localhost:3978/api/accounts?
@routes.get("/api/accounts")
async def accounts(request):
api_url = "http://127.0.0.1:3978/api/users"
response = requests.get(api_url)
return json_response(data=respone.json())
@routes.get("/api/users")
async def users(request):
pass
aiohttp.web.HTTPFound('\someendpoint')redirects to the given endpoint and completes the execution, but I want it to come to the calling function.