![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| class | HttpError |
| Transport-level failure: unresolvable host, refused connection, timeout. More... | |
| struct | Response |
| An HTTP response, with the body already de-chunked. More... | |
| struct | Url |
| The pieces of an http:// URL this client needs. More... | |
Functions | |
| Url | parse_url (const std::string &url) |
| Splits an http:// URL. | |
| Response | get (const std::string &url, int timeoutMillis) |
| GET a URL. | |
| Response | post_json (const std::string &url, const std::string &json, int timeoutMillis) |
| POST a JSON document. | |
|
inline |
|
inline |
Splits an http:// URL.
Supports host, host:port and [v6addr]:port forms.
| url | the URL |
Definition at line 78 of file http.h.
References line::http::Url::host, line::InputError::InputError(), parse_url(), line::http::Url::path, line::http::Url::port, and line::UnsupportedError::UnsupportedError().
Referenced by parse_url().
|
inline |
POST a JSON document.
| url | the absolute http:// URL |
| json | the request body |
| timeoutMillis | read timeout in milliseconds, 0 for none |
Definition at line 361 of file http.h.
References post_json().
Referenced by line::sym::SageRestEngine::isUsable(), line::jmt::jmt_solve_rest(), line::ldes::ldes_solve_rest(), and post_json().