httptools icon indicating copy to clipboard operation
httptools copied to clipboard

[Feature Request] Adding header file for url_parser.pyx, and parser.pyx

Open raceychan opened this issue 11 months ago • 1 comments

I would like to be able to use/extend classes/functions from parser.pyx and url_parser.pyx, however, currently I am not able to use it since its missing pxd files.

I can submit a PR if this is something you guys would agree with.

raceychan avatar Feb 16 '25 13:02 raceychan

I did a quick scan through on parser.pyx, it seems that it works by receiving a python object, and inspect on the object to see what are the implemented callbacks, wouldn't it be easier and faster for the protocol object to just inherit from httptools.parser.HttpParser?

we don't need to do all those

if self._proto_on_xxx is not None:
    self._proto_on_xxx()

raceychan avatar Feb 18 '25 15:02 raceychan