As highlighted and discussed in issue #171, the requests library seems to supply wrong content types, leading to certain upload operations such as replace_datafile not working (see the issue for details). This PR addresses this issue and substitutes requests with httpx that fixes the highlighted problem.
Besides the previously mentioned fix, the library also provides means of async requests as shown here. Since async requests were planned anyway, this would inevitably also lead to ditching requests and thus the change to httpx already paves the way.
Changes introduced by this PR
Substituted base requests get_request, post_request, put_request and delete_request with httpx requests
Update requirements to include httpx>=0.26.0
Added tests for datafile upload and replacement
test_file_replacement addresses an example given in issue #171
Additional notes
Due to httpx supporting Python >3.8, tests for 3.7 had to be removed
Overview
As highlighted and discussed in issue #171, the
requests
library seems to supply wrong content types, leading to certain upload operations such asreplace_datafile
not working (see the issue for details). This PR addresses this issue and substitutesrequests
withhttpx
that fixes the highlighted problem.Besides the previously mentioned fix, the library also provides means of async requests as shown here. Since async requests were planned anyway, this would inevitably also lead to ditching
requests
and thus the change tohttpx
already paves the way.Changes introduced by this PR
get_request
,post_request
,put_request
anddelete_request
withhttpx
requestshttpx>=0.26.0
test_file_replacement
addresses an example given in issue #171Additional notes
httpx
supporting Python >3.8, tests for 3.7 had to be removedCloses
Fixes #171