Skip to content

[DISCUSS] Selecting a C++ HTTP Client Library for REST #232

@HeartLinked

Description

@HeartLinked

I'm proposing we select an HTTP client library for rest catalog. I've reviewed libcurl, cpr, and cpp-httplib.

I suggest we rule out libcurl for direct use. Its C-style API is too complex and error-prone for a modern C++23 project.This leaves us with two primary contenders that offer modern C++ wrappers: cpr and cpp-httplib.The main advantage of cpp-httplib is its simplicity. It's a header-only library with virtually zero dependencies (unless HTTPS is needed), which makes integration extremely straightforward.

However, after a deeper comparison, I believe cpr is the superior choice for our project for its modern and usable API, rich features. Because cpr is a wrapper around libcurl, it inherits its robustness and extensive feature set. This includes superior performance characteristics, fine-grained control over things like timeouts and authentication, and asynchronous request capabilities.

Image

I've conducted a POC with a demo using integrated cpr here: #230 . WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions