[Python-ideas] Providing a public API for creating and parsing HTTP messages

Nathaniel Smith njs at pobox.com
Tue Apr 17 04:19:16 EDT 2018


On Mon, Apr 16, 2018 at 11:21 PM, Derek Maciel <derekamaciel at gmail.com> wrote:
> The modules http.client and http.server both do a wonderful job when
> implementing HTTP clients and servers, respectively. However, occasionally
> there may be a need to create and parse HTTP messages themselves without
> needing to implement a client or server.

The way http.client/http.server are written, the code for creating and
parsing messages is very tangled up with the code for sending and
receiving data, so this wouldn't be easy to do without rewriting them
from scratch. But would you accept a third-party package?
https://h11.readthedocs.io

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Python-ideas mailing list