Skip to content

Building samples

Himanshu Shekhar edited this page Oct 4, 2017 · 4 revisions

Samples inside EasyHttp are built as a separate CMake project so that to mirror the actual library usage.

Before you can build the samples, first make sure you have EasyHttp installed.

Installing EasyHttp

See Installing EasyHttp

Build samples

Assuming you have already have a local copy of easyhttpcpp project cloned.

cd easyhttpcpp/samples
mkdir _build
cd _build
cmake ../
make

This will build all the samples present inside the samples folder.

Run sample

Once built, lets run a given sample, say SimpleHttpClient.

cd bin
./easyhttpcpp-samples-SimpleHttpClient https://github.com/sony/easyhttpcpp

This will download and print the contents of https://github.com/sony/easyhttpcpp as an html document.

Usage: ./easyhttpcpp-samples-SimpleHttpClient <any-url>

Clone this wiki locally