apistar icon indicating copy to clipboard operation
apistar copied to clipboard

Doing async requests

Open kelvan opened this issue 5 years ago • 3 comments

Just found out to my surprise that the apistar client does not support async requests. As this project seems rather dead, maybe someone knows a similar one that implement async? did some overriding to achieve it in a hacky way: https://gist.github.com/kelvan/49e3efb99c329b4c2476d49458b19c19

kelvan avatar Oct 29 '20 14:10 kelvan

Use HTTPX.

carltongibson avatar Oct 29 '20 15:10 carltongibson

So the project is indeed dead?

hcastilho avatar Oct 30 '20 10:10 hcastilho

@carltongibson can you elaborate how I should use httpx? Only way to use httpx here is to not use apistar client and reimplement the whole api client by hand. Using a httpx async client as session in apistar won't work as it does not await it. Using openapi-generator with --library asyncio now to create and package the client in the ci pipeline

kelvan avatar Nov 10 '20 18:11 kelvan