PaperdInk-Library
PaperdInk-Library copied to clipboard
HTTPClient tutorial needed
Could you include a tutorial on how to call custom REST/JSON API calls hosted on any HTTP(S) address. The quote example is the closest, but I struggle with making the connection as my connections always fail. I have tried to import the SSL certificate into the code by exporting them from Chrome browser. Even if my cert is actually based on the same Let's Encrypt root CA, the connection fails with my URL but not with the quote URL. Then I hosted the service on HTTP instead of HTTPS with no certificate, and still fails. Some instructions how to make the HTTPS connection work with any valid certificate would be nice. I think it is a cert issue but I don't know why.
WiFiClientSecure *client = new WiFiClientSecure;
client->setCACert(cert);
{
HTTPClient https;
https.begin(*client, url);