Skip to content

dontcare/httpparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTPPARSER

https://travis-ci.org/dontcare/httpparser.svg?branch=master

httpparser is a Python binding for PicoHttpParser

Installation

httpparser requires Python 3.5+ and is available on PyPI.

Use pip to install it:

pip install httpparser

Using httpparser

import httpparser

class Protocol:

    def __init__(self):
        self.parser = httpparser.Request(self)

    def on_header(self, name, value):
        pass

    def on_headers(self, headers):
        pass

    def on_uri(self, uri):
        pass

    def on_body(self, body):
        pass

    def on_complete(self):
        pass

    def data_received(self, data):
        self.parser.parse(data)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published