Closed ammar92 closed 7 months ago
Httpx seems to be the better library nowadays and given that it's mostly compatible it should indeed not be a lot of effort to switch. We would have to test it carefully, because as far as I know we have lot of requests between services that are not covered by integration tests.
Agreed, when the dust around 1.14 / reports settles we should have a look at this. Preferably at the beginning of a sprint, right after a release so we can test the changes for two sprints.
make reset
.feature
or hotfix
works as intended.Looks good! No error messages are shown and the logs look fine too. Ready for merge.
n/a
n/a
Is your feature request related to a problem? Please describe. I propose to replace
requests
withhttpx
for the following reasons:requests
which only supports response streaming,httpx
also supports request streaming, which can be beneficial when handling larger file (uploads), e.g. saving larger files to bytes in chunkshttpx.Client
conveniently handles base URLs, which in our case results in less boiler plate code when handling base URLs from settingsDescribe the solution you'd like For the transition I suggest to do the following:
requests
withhttpx
dependency for each modulerequests.Session
objects withhttpx.Client
Additional context This came to my mind because of the extra boilerplate code to handle base URLs. Also in an earlier issue where we actually used
httpx
, it blocked a GET request including a body, which is a good thing because it meanshttpx
practices (modern) standards more strictly.