circuits.web.http module

Hyper Text Transfer Protocol

This module implements the server side Hyper Text Transfer Protocol or commonly known as HTTP.

class circuits.web.http.HTTP(server, encoding='utf-8', channel='web')

Bases: circuits.core.components.BaseComponent

HTTP Protocol Component

Implements the HTTP server protocol and parses and processes incoming HTTP messages, creating and sending an appropriate response.

The component handles Read events on its channel and collects the associated data until a complete HTTP request has been received. It parses the request’s content and puts it in a Request object and creates a corresponding Response object. Then it emits a Request event with these objects as arguments.

The component defines several handlers that send a response back to the client.

base
channel = 'web'
protocol
scheme
uri
version