|
Botan 3.14.1
Crypto and TLS for C&
|
Classes | |
| struct | Case_Insensitive_Less |
| class | HTTP_Error |
| class | RequestLimits |
| class | Response |
Typedefs | |
| using | Headers = std::map<std::string, std::string, Case_Insensitive_Less> |
| typedef std::function< Response(std::string_view, std::string_view, std::string_view, std::chrono::milliseconds, size_t)> | http_exch_fn |
Functions | |
| Response | GET_sync (const URI &uri, const RequestLimits &limits) |
| Response | http_sync (const http_exch_fn &http_transact, std::string_view verb, const URI &uri, std::string_view content_type, const std::vector< uint8_t > &body, const RequestLimits &limits) |
| Response | http_sync (std::string_view verb, const URI &uri, std::string_view content_type, const std::vector< uint8_t > &body, const RequestLimits &limits) |
| std::ostream & | operator<< (std::ostream &o, const Response &resp) |
| Response | POST_sync (const URI &uri, std::string_view content_type, const std::vector< uint8_t > &body, const RequestLimits &limits) |
| Response | read_response_from_socket (OS::Socket &socket, std::chrono::milliseconds timeout, size_t max_body_size) |
| std::string | url_encode (std::string_view in) |
| using Botan::HTTP::Headers = std::map<std::string, std::string, Case_Insensitive_Less> |
Definition at line 60 of file http_util.h.
| typedef std::function<Response(std::string_view, std::string_view, std::string_view, std::chrono::milliseconds, size_t)> Botan::HTTP::http_exch_fn |
Performs one request/response exchange: (hostname, service, request message, timeout, max body size)
Definition at line 136 of file http_util.h.
| Response BOTAN_TEST_API Botan::HTTP::GET_sync | ( | const URI & | uri, |
| const RequestLimits & | limits ) |
Definition at line 431 of file http_util.cpp.
References GET_sync(), and http_sync().
Referenced by GET_sync().
| Response BOTAN_TEST_API Botan::HTTP::http_sync | ( | const http_exch_fn & | http_transact, |
| std::string_view | verb, | ||
| const URI & | uri, | ||
| std::string_view | content_type, | ||
| const std::vector< uint8_t > & | body, | ||
| const RequestLimits & | limits ) |
Definition at line 413 of file http_util.cpp.
References http_sync(), and Botan::HTTP::RequestLimits::timeout().
Referenced by GET_sync(), http_sync(), http_sync(), and POST_sync().
| Response Botan::HTTP::http_sync | ( | std::string_view | verb, |
| const URI & | uri, | ||
| std::string_view | content_type, | ||
| const std::vector< uint8_t > & | body, | ||
| const RequestLimits & | limits ) |
Definition at line 423 of file http_util.cpp.
References http_sync().
| BOTAN_TEST_API std::ostream & Botan::HTTP::operator<< | ( | std::ostream & | o, |
| const Response & | resp ) |
Definition at line 301 of file http_util.cpp.
References Botan::HTTP::Response::body(), Botan::cast_uint8_ptr_to_char(), Botan::HTTP::Response::headers(), Botan::HTTP::Response::status_code(), and Botan::HTTP::Response::status_message().
| Response Botan::HTTP::POST_sync | ( | const URI & | uri, |
| std::string_view | content_type, | ||
| const std::vector< uint8_t > & | body, | ||
| const RequestLimits & | limits ) |
Definition at line 435 of file http_util.cpp.
References http_sync(), and POST_sync().
Referenced by POST_sync().
| Response BOTAN_TEST_API Botan::HTTP::read_response_from_socket | ( | OS::Socket & | socket, |
| std::chrono::milliseconds | timeout, | ||
| size_t | max_body_size ) |
Read a complete HTTP/1.0 response from an already-connected socket and return the parsed Response. Enforces header- and body-size limits during the read. Exposed via BOTAN_TEST_API so the parser can be exercised against a fake socket; production code reaches it through http_transact.
Definition at line 207 of file http_util.cpp.
References Botan::cast_uint8_ptr_to_char(), Botan::DefaultBufferSize, Botan::fmt(), and Botan::OS::Socket::read().
| std::string BOTAN_TEST_API Botan::HTTP::url_encode | ( | std::string_view | in | ) |
Definition at line 282 of file http_util.cpp.
References Botan::CharacterValidityTable::alpha_numeric_plus(), and Botan::CharacterValidityTable::invert().