Skip to content

mfichman/http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http

Simple HTTP asynchronous library for modern C++. Depends on coro. Here's the basic usage:

auto coro = coro::start([]{
    try {
        auto res = http::post(
            "https://192.168.1.154/user/login", 
             "{ \"UserId\": \"matt\", \"Password\": \"matt\"} "
        );

        auto sessionId = res.cookie("SessionId");
        std::cout << sessionId.value() << std::endl;
        std::cout << sessionId.httpOnly() << std::endl;
        std::cout << sessionId.secure() << std::endl;
        std::cout << sessionId.path() << std::endl;
    } catch (coro::SystemError const& ex) {
        std::cerr << ex.what() << std::endl;
    }
});
coro::run();

About

Simple & modern HTTP client for C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published