Best way to send nlohmann json payload using cpr C++ Request library

Viewed 2413

I'm trying to post JSON objects to the external server using two C++ libraries: nlohmann/json and whoshuu/cpr

In python I can do this simply by using requests.post(url, json=data)

Is there a simple way to convert nlohmann::json class to cpr::Payload equivalent needed for cpr::POST?

1 Answers
Related