https out of the box; TLS knobs via the .curl() escape hatch.
https out of the box; TLS knobs via the .curl() escape hatch.
#include <asio.hpp>
#include <iostream>
int main() {
asio::io_context io;
http.
request(
"https://postman-echo.com/get")
(void)h;
})
if (ec) {
std::cerr << "tls/transport error: " << ec.message() << "\n";
return;
}
std::cout <<
"verified https: " << res.
http_code_ <<
"\n";
});
io.run();
}
RequestBuilder & curl(std::function< void(CURL *)> fn)
Definition cofetch.h:366
RequestBuilder request(std::string url)
Start a fluent request chain: request(url).body(...).post(token).
Definition cofetch.h:412
long http_code_
Definition cofetch.h:176