Prefect cloud is giving a 403 Security violation r...
# prefect-server
Prefect cloud is giving a 403 Security violation response to a POST using httpx (an async http module) to post a mutation (file attached). The call is being made from a FastAPI app, and works fine if I use the requests module. I know Prefect expects synchronous tasks, does this extend to using http on the API calls as well?
Hi @darylgunn, there's no reason why prefect shouldn't work with httpx (or any other http client). My first guess is you have an `HTTP_PROXY`/`HTTPS_PROXY` set.
picks this up automatically, while
requires the user to opt-in to respecting these environment variables:
Thanks for the reply. None of HTTP_PROXY HTTPS_PROXY or ALL_PROXY are set. (I've checked for them on both the requests and httpx versions of the code). Since there's no reason it shouldn't work for Prefect I know it's an error in my code so I'll keep digging. [edit] It appears to be httpx related, because even the non-async version of the httpx client fails. I can do a GET to ok though. aiohttp has the same security issue so its seems likely it something they're not sending that requests is like you suggested.