|
Apache Mesos
|
Namespaces | |
| authentication | |
| authorization | |
| header | |
| internal | |
| path | |
| query | |
| streaming | |
Classes | |
| struct | Accepted |
| struct | BadRequest |
| struct | CaseInsensitiveEqual |
| struct | CaseInsensitiveHash |
| struct | Conflict |
| class | Connection |
| Represents a connection to an HTTP server. More... | |
| struct | Forbidden |
| class | Headers |
| struct | InternalServerError |
| struct | MethodNotAllowed |
| struct | NotAcceptable |
| struct | NotFound |
| struct | NotImplemented |
| struct | OK |
| class | Pipe |
| struct | PreconditionFailed |
| struct | Request |
| struct | Response |
| class | Server |
| struct | ServiceUnavailable |
| struct | Status |
| struct | TemporaryRedirect |
| struct | Unauthorized |
| struct | UnsupportedMediaType |
| struct | URL |
Enumerations | |
| enum | Scheme { Scheme::HTTP, Scheme::HTTP_UNIX } |
Functions | |
| bool | isValidStatus (uint16_t code) |
| std::ostream & | operator<< (std::ostream &stream, const URL &url) |
| std::string | encode (const std::string &s, const std::string &additional_chars="") |
| Returns a percent-encoded string according to RFC 3986. More... | |
| Try< std::string > | decode (const std::string &s) |
| Decode a string that is Base64-encoded with the standard Base64 alphabet. More... | |
| Try< std::vector< Response > > | decodeResponses (const std::string &s) |
| Decode HTTP responses from the given string. More... | |
| Future< Connection > | connect (const network::Address &address, Scheme scheme, const Option< std::string > &peer_hostname) |
| Future< Connection > | connect (const network::Address &address, Scheme scheme) |
| Future< Connection > | connect (const URL &url) |
| template<typename F > | |
| Future< Nothing > | serve (const network::Socket &s, F &&f) |
| Request | createRequest (const UPID &upid, const std::string &method, bool enableSSL=false, const Option< std::string > &path=None(), const Option< Headers > &headers=None(), const Option< std::string > &body=None(), const Option< std::string > &contentType=None()) |
| Request | createRequest (const URL &url, const std::string &method, const Option< Headers > &headers=None(), const Option< std::string > &body=None(), const Option< std::string > &contentType=None()) |
| Future< Response > | request (const Request &request, bool streamedResponse=false) |
| Asynchronously sends an HTTP request to the process and returns the HTTP response once the entire response is received. More... | |
| Future< Response > | get (const URL &url, const Option< Headers > &headers=None()) |
| Future< Response > | get (const UPID &upid, const Option< std::string > &path=None(), const Option< std::string > &query=None(), const Option< Headers > &headers=None(), const Option< std::string > &scheme=None()) |
| Future< Response > | post (const URL &url, const Option< Headers > &headers=None(), const Option< std::string > &body=None(), const Option< std::string > &contentType=None()) |
| Future< Response > | post (const UPID &upid, const Option< std::string > &path=None(), const Option< Headers > &headers=None(), const Option< std::string > &body=None(), const Option< std::string > &contentType=None(), const Option< std::string > &scheme=None()) |
| Future< Response > | requestDelete (const URL &url, const Option< Headers > &headers=None()) |
| Asynchronously sends an HTTP DELETE request to the process with the given UPID and returns the HTTP response. More... | |
| Future< Response > | requestDelete (const UPID &upid, const Option< std::string > &path=None(), const Option< Headers > &headers=None(), const Option< std::string > &scheme=None()) |
| Asynchronously sends an HTTP DELETE request to the process with the given UPID and returns the HTTP response. More... | |
|
strong |
| Future<Connection> process::http::connect | ( | const network::Address & | address, |
| Scheme | scheme, | ||
| const Option< std::string > & | peer_hostname | ||
| ) |
| Future<Connection> process::http::connect | ( | const network::Address & | address, |
| Scheme | scheme | ||
| ) |
| Future<Connection> process::http::connect | ( | const URL & | url | ) |
| Request process::http::createRequest | ( | const UPID & | upid, |
| const std::string & | method, | ||
| bool | enableSSL = false, |
||
| const Option< std::string > & | path = None(), |
||
| const Option< Headers > & | headers = None(), |
||
| const Option< std::string > & | body = None(), |
||
| const Option< std::string > & | contentType = None() |
||
| ) |
| Request process::http::createRequest | ( | const URL & | url, |
| const std::string & | method, | ||
| const Option< Headers > & | headers = None(), |
||
| const Option< std::string > & | body = None(), |
||
| const Option< std::string > & | contentType = None() |
||
| ) |
|
inline |
Decode a string that is Base64-encoded with the standard Base64 alphabet.
| s | The string to decode. |
Decode HTTP responses from the given string.
| s | the given string. |
| std::string process::http::encode | ( | const std::string & | s, |
| const std::string & | additional_chars = "" |
||
| ) |
Returns a percent-encoded string according to RFC 3986.
| s | The input string, must not arleady be percent-encoded. |
| additional_chars | When specified, all characters in it are also percent-encoded. |
s. | Future<Response> process::http::get | ( | const UPID & | upid, |
| const Option< std::string > & | path = None(), |
||
| const Option< std::string > & | query = None(), |
||
| const Option< Headers > & | headers = None(), |
||
| const Option< std::string > & | scheme = None() |
||
| ) |
| bool process::http::isValidStatus | ( | uint16_t | code | ) |
| std::ostream& process::http::operator<< | ( | std::ostream & | stream, |
| const URL & | url | ||
| ) |
| Future<Response> process::http::post | ( | const URL & | url, |
| const Option< Headers > & | headers = None(), |
||
| const Option< std::string > & | body = None(), |
||
| const Option< std::string > & | contentType = None() |
||
| ) |
| Future<Response> process::http::post | ( | const UPID & | upid, |
| const Option< std::string > & | path = None(), |
||
| const Option< Headers > & | headers = None(), |
||
| const Option< std::string > & | body = None(), |
||
| const Option< std::string > & | contentType = None(), |
||
| const Option< std::string > & | scheme = None() |
||
| ) |
Asynchronously sends an HTTP request to the process and returns the HTTP response once the entire response is received.
| streamedResponse | Being true indicates the HTTP response will be 'PIPE' type, and caller must read the response body from the Pipe::Reader, otherwise, the HTTP response will be 'BODY' type. |
| Future<Response> process::http::requestDelete | ( | const URL & | url, |
| const Option< Headers > & | headers = None() |
||
| ) |
Asynchronously sends an HTTP DELETE request to the process with the given UPID and returns the HTTP response.
| url | The target url for the request. |
| headers | Optional header for the request. |
| Future<Response> process::http::requestDelete | ( | const UPID & | upid, |
| const Option< std::string > & | path = None(), |
||
| const Option< Headers > & | headers = None(), |
||
| const Option< std::string > & | scheme = None() |
||
| ) |
Asynchronously sends an HTTP DELETE request to the process with the given UPID and returns the HTTP response.
| upid | The target process's assigned untyped PID. |
| path | The optional path to be be deleted. If not send the request is send to the process directly. |
| headers | Optional headers for the request. |
| scheme | Optional scheme for the request. |
| Future<Nothing> process::http::serve | ( | const network::Socket & | s, |
| F && | f | ||
| ) |
1.8.11