The headers module

The headers module contains a class which provides the ability to create a specific HTTP header.

The Header class

Inheritance diagram of pyamp.web.http.headers.Header

class pyamp.web.http.headers.Header(identifier, value)[source]

The Header class provides the ability to create a specific HTTP header.

  • identifier – The header identifier
  • value – The value for the header
classmethod contentType(contentType)[source]

Create a content type header.

  • contentType – The type of content
getId()[source]

Get the ID for this header.

classmethod getOperatingSystem(headers)[source]

Get the operating system from the given headers.

  • headers – The headers
getValue()[source]

Get the value for this header.

classmethod jsonContent()[source]

Create a JSON content type header.

classmethod location(location)[source]

Create a location header.

  • location – The location
classmethod textHtmlContent()[source]

Create an text/html content type header.

The ContentTypes class

Inheritance diagram of pyamp.web.http.headers.ContentTypes

class pyamp.web.http.headers.ContentTypes

The ContentTypes class contains constants pertaining to different types of content.

Bmp

A BMP image content.

Css

CSS content.

Gif

A GIF image content.

Ico

An ICO image content.

JavaScript

JavaScript content.

Json

JSON content.

Png

An PNG image content.

TextHtml

Standard text HTML content.

The OS class

Inheritance diagram of pyamp.web.http.headers.OS

pyamp.web.http.headers.OS

alias of OperatingSystems

The HeaderIds class

Inheritance diagram of pyamp.web.http.headers.HeaderIds

class pyamp.web.http.headers.HeaderIds

The HeaderIds class contains constants pertaining to header identifiers.

ContentType

The content type header id.

Location

The location header id.

UserAgent

The user agent header id.

Table Of Contents

Previous topic

The constants module

Next topic

The page module

This Page