Apache Mesos
Classes | Namespaces | Typedefs | Enumerations | Functions
http.hpp File Reference
#include <ctype.h>
#include <stdint.h>
#include <atomic>
#include <initializer_list>
#include <iosfwd>
#include <memory>
#include <queue>
#include <string>
#include <vector>
#include <boost/functional/hash.hpp>
#include <process/address.hpp>
#include <process/clock.hpp>
#include <process/future.hpp>
#include <process/owned.hpp>
#include <process/pid.hpp>
#include <process/socket.hpp>
#include <stout/error.hpp>
#include <stout/hashmap.hpp>
#include <stout/ip.hpp>
#include <stout/json.hpp>
#include <stout/jsonify.hpp>
#include <stout/none.hpp>
#include <stout/nothing.hpp>
#include <stout/option.hpp>
#include <stout/stringify.hpp>
#include <stout/strings.hpp>
#include <stout/try.hpp>

Go to the source code of this file.

Classes

class  process::Future< T >
 
struct  process::http::URL
 
struct  process::http::CaseInsensitiveHash
 
struct  process::http::CaseInsensitiveEqual
 
struct  process::http::Status
 
class  process::http::Pipe
 
class  process::http::Pipe::Reader
 
class  process::http::Pipe::Writer
 
class  process::http::header::WWWAuthenticate
 
class  process::http::Headers
 
struct  process::http::Request
 
struct  process::http::Response
 
struct  process::http::OK
 
struct  process::http::Accepted
 
struct  process::http::TemporaryRedirect
 
struct  process::http::BadRequest
 
struct  process::http::Unauthorized
 
struct  process::http::Forbidden
 
struct  process::http::NotFound
 
struct  process::http::MethodNotAllowed
 
struct  process::http::NotAcceptable
 
struct  process::http::Conflict
 
struct  process::http::PreconditionFailed
 
struct  process::http::UnsupportedMediaType
 
struct  process::http::InternalServerError
 
struct  process::http::NotImplemented
 
struct  process::http::ServiceUnavailable
 
class  process::http::Connection
 Represents a connection to an HTTP server. More...
 
class  process::http::Server
 
struct  process::http::Server::CreateOptions
 
struct  process::http::Server::StopOptions
 

Namespaces

 process
 
 process::http
 
 process::http::authentication
 
 process::http::authorization
 
 process::http::header
 
 process::http::path
 
 process::http::query
 
 process::http::internal
 
 process::http::streaming
 

Typedefs

typedef hashmap< std::string, lambda::function< process::Future< bool > const Request, const Option< authentication::Principal >)> > process::http::authorization::AuthorizationCallbacks
 

Enumerations

enum  process::http::Scheme { process::http::Scheme::HTTP, process::http::Scheme::HTTP_UNIX }
 

Functions

Future< Nothingprocess::http::authentication::setAuthenticator (const std::string &realm, Owned< Authenticator > authenticator)
 Sets (or overwrites) the authenticator for the realm. More...
 
Future< Nothingprocess::http::authentication::unsetAuthenticator (const std::string &realm)
 Unsets the authenticator for the realm. More...
 
void process::http::authorization::setCallbacks (const AuthorizationCallbacks &)
 
void process::http::authorization::unsetCallbacks ()
 
bool process::http::isValidStatus (uint16_t code)
 
std::ostream & process::http::operator<< (std::ostream &stream, const URL &url)
 
Try< hashmap< std::string, std::string > > process::http::path::parse (const std::string &pattern, const std::string &path)
 
std::string process::http::encode (const std::string &s, const std::string &additional_chars="")
 Returns a percent-encoded string according to RFC 3986. More...
 
Try< std::string > process::http::decode (const std::string &s)
 Decode a string that is Base64-encoded with the standard Base64 alphabet. More...
 
Try< std::vector< Response > > process::http::decodeResponses (const std::string &s)
 Decode HTTP responses from the given string. More...
 
Try< hashmap< std::string, std::string > > process::http::query::decode (const std::string &query)
 Decode a string that is Base64-encoded with the standard Base64 alphabet. More...
 
std::string process::http::query::encode (const hashmap< std::string, std::string > &query)
 
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)
 
Future< Nothingprocess::http::internal::serve (network::Socket s, std::function< Future< Response >(const Request &)> &&f)
 
template<typename F >
Future< Nothingprocess::http::serve (const network::Socket &s, F &&f)
 
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())
 
Future< Response > process::http::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 > process::http::get (const URL &url, const Option< Headers > &headers=None())
 
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())
 
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())
 
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. More...
 
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. More...
 
Future< Response > process::http::streaming::get (const URL &url, const Option< Headers > &headers=None())
 
Future< Response > process::http::streaming::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 > process::http::streaming::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::streaming::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())