Curlex cx;
fmt::print("curl version: {}\n", cx.version());
test(cx)
......
void test(Curlex& cx) {
auto request = Request()
.scheme("http")
.host("127.0.0.1:3030")
.endpoint("questions")
.add_param("start", "1")
.add_param("end", "400")
.build();
if (auto response = cx.GET(request); response) {
fmt::print("-------------------------------------------\n");
fmt::print("response code: {}\n", response->code());
fmt::print("response headers:\n");
for (auto it: response->headers())
fmt::print("\t{}\n", it);
fmt::print("-------------------------------------------\n");
fmt::print("response body:\n");
fmt::print("{}\n", response->body());
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
C++ wrapper for the well-known curl library (written in C).
License
piotrpsz/curlex
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
C++ wrapper for the well-known curl library (written in C).
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published