Simple GET request with ESP8266HTTPClient I am trying to do a simple GET request. But I always get status code -1. Here is my complete code.

#include &lt;Arduino.h&gt;
#include &lt;ESP8266WiFi.h&gt;
#include &lt;ESP8266HTTPClient.h&gt;

WiFiClient client;
#define AP_SSID "CCR"
#define AP_PASSWORD  "ccrxxxxx"

void wifiConnect() {
  Serial.print("Connecting to AP");
  WiFi.begin(AP_SSID, AP_PASSWORD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.print(".");
  }
}

void setup() {
  Serial.begin(9600);
  pinMode(0,1);
  Serial.begin(9600);
  delay(300);
  Serial.println("starting");
  WiFi.disconnect();
  Serial.println("disconnected");
  wifiConnect();
  Serial.println("Connected");
}

void loop() {
  HTTPClient http;
  http.begin("https://calm-falls-41696.herokuapp.com/api/v1/cards");
  http.addHeader("Content-Type", "application/json");
  int httpCode = http.GET();
  Serial.println(httpCode);
  if(httpCode == HTTP_CODE_OK) {
  Serial.print("HTTP response code ");
    Serial.println(httpCode);
    String response = http.getString();
    Serial.println(response);
  }
  http.end();
}


Wifi connection was successful. But in my serial terminal I always see -1. I am using PlatfromIO in Visual Studio code.

Update 1: The URL was corrected.

 http.begin("https://calm-falls-41696.herokuapp.com/api/v1/cards.json");


I tested it with google.com too. But it is still returning -1.
As Musa said, I needed to suply the website certificate footprint to http.begin.

void loop() {
  HTTPClient http;
  String thumbprint="08:3B:71:72:02:43:6E:CA:ED:42:86:93:BA:7E:DF:81:C4:BC:62:30";
  String path = "https://calm-falls-41696.herokuapp.com/api/v1/cards.json";
  http.begin(path, thumbprint);
  int httpCode = http.GET();
  Serial.println(httpCode);
  if(httpCode == HTTP_CODE_OK) {
    Serial.print("HTTP response code ");
    Serial.println(httpCode);
    String response = http.getString();
    Serial.println(response);
 }
  http.end();
  delay(1000);
}