vibe.http.common

Common classes for HTTP clients and servers.

Public Imports

vibe.http.status
public import vibe.http.status;
Undocumented in source.

Members

Classes

ChunkedInputStream
class ChunkedInputStream

Takes an input stream that contains data in HTTP chunked format and outputs the raw data.

ChunkedOutputStream
class ChunkedOutputStream

Outputs data to an output stream in HTTP chunked format.

Cookie
class Cookie
Undocumented in source.
HTTPRequest
class HTTPRequest

Represents an HTTP request made to a server.

HTTPResponse
class HTTPResponse

Represents the HTTP response from the server back to the client.

HTTPStatusException
class HTTPStatusException

Respresents a HTTP response status.

MultiPart
class MultiPart
Undocumented in source.

Enums

HTTPMethod
enum HTTPMethod
Undocumented in source.
HTTPVersion
enum HTTPVersion
Undocumented in source.

Functions

chunkedInputStream
ChunkedInputStream chunkedInputStream(IS source_stream)

Creates a new ChunkedInputStream instance.

createChunkedInputStreamFL
FreeListRef!ChunkedInputStream createChunkedInputStreamFL(IS source_stream)

Creates a new ChunkedInputStream instance.

createChunkedOutputStream
ChunkedOutputStream createChunkedOutputStream(OS destination_stream, IAllocator allocator)

Creates a new ChunkedInputStream instance.

createChunkedOutputStreamFL
FreeListRef!ChunkedOutputStream createChunkedOutputStreamFL(OS destination_stream, IAllocator allocator)

Creates a new ChunkedOutputStream instance.

enforceBadRequest
T enforceBadRequest(T condition, string message, string file, typeof(__LINE__) line)

Utility function that throws a HTTPStatusException with status code "400 Bad Request" if the _condition is not met.

enforceHTTP
T enforceHTTP(T condition, HTTPStatus statusCode, string message, string file, typeof(__LINE__) line)

Utility function that throws a HTTPStatusException if the _condition is not met.

getHTTPVersionString
string getHTTPVersionString(HTTPVersion ver)
httpMethodFromString
HTTPMethod httpMethodFromString(string str)

Returns the HttpMethod value matching the given HTTP method string.

httpMethodString
string httpMethodString(HTTPMethod m)

Returns the string representation of the given HttpMethod.

parseHTTPCookie
string parseHTTPCookie(string header_string, Cookie dst)
Tuple!(string, Cookie) parseHTTPCookie(string header_string)

Parses the cookie from a header field, returning the name of the cookie. Implements an algorithm equivalent to https://tools.ietf.org/html/rfc6265#section-5.2

parseHTTPVersion
HTTPVersion parseHTTPVersion(string str)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

CookieValueMap
struct CookieValueMap

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.

Authors

Sönke Ludwig, Jan Krüger