The smallest cofetch program: one GET, one callback.
The smallest cofetch program: one GET, one callback.
#include <asio.hpp>
#include <iostream>
int main() {
asio::io_context io;
http.
async_get(
"https://postman-echo.com/get",
if (ec) {
std::cerr << "transport error: " << ec.message() << "\n";
return;
}
});
io.run();
}
auto async_get(std::string url, CompletionToken &&token)
Definition cofetch.h:324
long http_code_
Definition cofetch.h:176
std::string data_
Definition cofetch.h:177