module HTTP

Nested Classes and Modules

class AcceptEncoding

A middleware that sets the accept-encoding header and decodes the response according to the content-encoding header.

module Body
class ContentEncoding

Encode a response according the the request's acceptable encodings.

class Cookie

Represents an individual cookie key-value pair.

class Error

A generic, HTTP protocol error.

class RefusedError

Raised when an HTTP stream or request was refused before any processing occurred. In the case of requests, it indicates that the request was refused before any processing occurred, and can be safely retried.

class RemoteError

Raised when the remote endpoint fails while processing an HTTP stream or request. This error does not indicate whether application processing occurred. Where available, the protocol-specific error should be attached as the cause.

module BadRequest

Represents a bad request error (as opposed to a server error). This is used to indicate that the request was malformed or invalid.

class DuplicateHeaderError

Raised when a singleton (e.g. content-length) header is duplicated in a request or response.

class InvalidTrailerError

Raised when an invalid trailer header is encountered in headers.

module Header
class Headers

Headers are an array of key-value pairs. Some header keys represent multiple values.

class Methods

Provides a convenient interface for commonly supported HTTP methods.

class Middleware

The middleware interface provides a convenient wrapper for implementing HTTP middleware.

class Peer

Provide a well defined, cached representation of a peer (address).

module QuotedString

Handling of HTTP quoted strings.

class Request

Represents an HTTP request which can be used both server and client-side.

class Response

Represents an HTTP response which can be used both server and client-side.

module Status

HTTP status codes and their human-readable descriptions.

Definitions

RequestRefusedError = RefusedError

  • deprecated

Signature

deprecated

Use class Protocol::HTTP::RefusedError instead.

TOKEN = /[!#$%&'*+\-.^_`|~0-9A-Z]+/i

According to https://tools.ietf.org/html/rfc7231#appendix-C

QVALUE = /0(\.[0-9]{0,3})?|1(\.[0]{0,3})?/

https://tools.ietf.org/html/rfc7231#section-5.3.1