pythonpython-3.xrequesturllibhttp.client

http.client.HTTPConnection.request vs. urllib.request.Request


urllib.request and http.client are both python standard libraries. The docs for the relevant method from the former is here and the latter, here (am using 3.5)

Does anyone know why they have 2 methods within the standard libraries which appear to do the same thing, or what the difference between them is?

Reason for asking, is that I am working on merging some classes with the goal of sending a POST request of content-type multipart/form-data using Python standard libraries only. There is a question about that here with a link to code with a class which does it.


Solution

  • see: Python urllib vs httplib?