user16098: I am trying to do a simple GET request. But I always get status code -1. Here is my complete code.
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

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.

user-1: I tested your code only changing the URL and header, like this:
//  http.begin("http://calm-falls-41696.herokuapp.com/api/v1/cards");
  http.begin("http://bing.com");
  http.addHeader("Content-Type", "text/html");

And it return httpCode == 400.
As @tttapa said, it looks like the library doesn't support https.

user16098: 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);
}


16098: <p>I am trying to do a simple GET request. But I always get status code -1. Here is my complete code.</p>

<pre><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();
}
</code></pre>

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

<p><strong>Update 1:</strong> The URL was corrected.</p>

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

<p>I tested it with <code>google.com</code> too. But it is still returning -1.</p>
 -1: <p>I tested your code only changing the URL and header, like this:</p>

<pre><code>//  http.begin("http://calm-falls-41696.herokuapp.com/api/v1/cards");
  http.begin("http://bing.com");
  http.addHeader("Content-Type", "text/html");
</code></pre>

<p>And it return httpCode == 400.</p>

<p>As @tttapa said, it looks like the library doesn't support https.</p>
 16098: <p>As Musa said, I needed to suply the website certificate footprint to http.begin.</p>

<pre><code>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);
}
</code></pre>
