ansible / mazer

Experimental Ansible Galaxy Content Manager
GNU General Public License v3.0
114 stars 18 forks source link

Use 'requests' for http client #222

Closed alikins closed 5 years ago

alikins commented 5 years ago
SUMMARY
Use 'requests' for publish REST calls

Replace the use of http_client/httplib with requests
for the publish_file() method.

This doesn't use requests builtin multipart-form support,
but just uses the ansible_galaxy.multipart_form that was
already in use.

Fixes: #217
Fixes: #218

TODO: May need to replace the use of request.Response().json() with our json loads calls, since the requests default seems to make text strings from json into 'str' instead of a text type.