Skip to content

gmh5225/cpp-httplib-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openssl-shim-cpp-httplib

A minimal C++ example showing how to use cpp-httplib over HTTPS with openssl-shim.

The demo performs a GET request to:

  • https://www.howsmyssl.com/a/check

and prints the response body.

Requirements

  • CMake 3.15+
  • A C++ compiler with C++11 support or newer
  • Internet access during configure/build (dependencies are fetched with CMake FetchContent)

Build

cmake -S . -B build
cmake --build build

Run

./build/httplib_example

On Windows with multi-config generators (Visual Studio), run the executable from the config folder, for example:

.\build\Debug\httplib_example.exe

Project structure

  • src/httplib_example.cpp — example client code
  • cmake.toml — cmkr project definition
  • CMakeLists.txt — generated CMake file

Notes

  • CMakeLists.txt is generated from cmake.toml via cmkr.
  • Dependencies are pinned as follows:
    • cpp-httplib: v0.33.1
    • openssl_shim: master

About

Standalone example of using cpp-httplib with openssl-shim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 100.0%