20 #ifndef __OPERATOR_HTTP_HH_ 21 #define __OPERATOR_HTTP_HH_ 38 typedef std::pair<std::string, std::string>
header_t;
44 typedef std::function<void (std::unique_ptr<Error::Error>,
short code,
const headers_t &, std::unique_ptr<std::istream> body)>
httpcallback_t;
50 virtual void httpcall(
const std::string &method,
const std::string &URL,
const headers_t &, std::unique_ptr<std::istream> body,
size_t timeout,
const httpcallback_t &) = 0;
55 std::ostream & operator<<(std::ostream &os,
const url_encode &ue);
58 const std::string &orig;
60 operator std::string()
const {
61 std::ostringstream out;
68 #endif // __OPERATOR_HTTP_HH_
HTTP adapter interface.
Definition: http.hh:48
std::vector< header_t > headers_t
list of HTTP headers.
Definition: http.hh:41
std::function< void(std::unique_ptr< Error::Error >, short code, const headers_t &, std::unique_ptr< std::istream > body)> httpcallback_t
HTTP callback type.
Definition: http.hh:44
std::pair< std::string, std::string > header_t
HTTP header.
Definition: http.hh:38