API Docs for: 0.8.0
Show:

BaseBodyParser Class

Provides function to construct the structure needed to display the navigation in the Admin section of the application.

Constructor

BaseBodyParser

()

Item Index

Properties

Methods

getcontentEncoding

(
  • req
)
String static

Attempts to extract charset attribute from the content-type header.

Parameters:

  • req Request

Returns:

String:

the charset encoding

getRawData

(
  • cb
)

Retrieves the raw payload data as a string

Parameters:

  • cb Function

parse

(
  • The
  • A
)

Attempts to retrieve the payload body as a string

Parameters:

  • The Request

    incoming request whose payload should be parsed

  • A Function

    callback that taks two parameters: An Error, if occurred and the parsed body content as an object

Properties

CHARSET_HEADER_PREFIX

String private static

The prefix in the content-type header that indicates the charset used in the encoding

ENCODING_MAPPING

Object private static

A mapping that converts the HTTP standard for content-type encoding and what the Buffer prototype expects