Skip to content

HTTPClient tutorial needed #22

@jukkaaahola

Description

@jukkaaahola

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions