You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to generate a client lib using this tool and I'm facing some issues, specifically with setting custom headers for the request. I don't have any experience using httpx so far, but looks like setting these headers when instantiating httpx.AsyncClient and using them afterwards makes perfect sense. But for some reason at https://github.com/dmontagu/fastapi_client/blob/master/openapi-python-templates/api_client.mustache#L56httpx.Request is instantiated directly and no headers are proxied from httpx.AsyncClient. Using self._async_client.build_request at this line has solved the problem and I'd like to pull request it
Is there anything wrong with it? Or I can pull request?
The text was updated successfully, but these errors were encountered:
Hi! Thanks a lot for the project!
I'm trying to generate a client lib using this tool and I'm facing some issues, specifically with setting custom headers for the request. I don't have any experience using httpx so far, but looks like setting these headers when instantiating
httpx.AsyncClient
and using them afterwards makes perfect sense. But for some reason at https://github.com/dmontagu/fastapi_client/blob/master/openapi-python-templates/api_client.mustache#L56httpx.Request
is instantiated directly and no headers are proxied fromhttpx.AsyncClient
. Usingself._async_client.build_request
at this line has solved the problem and I'd like to pull request itIs there anything wrong with it? Or I can pull request?
The text was updated successfully, but these errors were encountered: