I am using ESP8266 to read data from firebase.
For Visual Studio 2015, the code is :
#define FIREBASE_URL "https://my-project.firebaseio.com/my-city.json?auth=my-key";
#define FIREBASE_FINGERPRINT "xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx"
#define FIREBASE_CONTENT "Content-Type"
#define FIREBASE_TYPE "application/json"
http.begin(FIREBASE_URL , FIREBASE_FINGERPRINT);
http.addHeader(FIREBASE_CONTENT, FIREBASE_TYPE);
if (http.GET() >= 200)
{
String payload = http.getString();
........
}
The above code works properly.
Now I have upgraded to Visual Studio 2019, compilation error appears on the line http.begin
New compiler needs more than two parameters after http.begin
I write :
WiFiClient clientt;
#define FIREBASE_HOST = "https://my-project.firebaseio.com";
http.begin(clientt, FIREBASE_HOST, 443, FIREBASE_URL , FIREBASE_FINGERPRINT);
However, the string payload received is "error : Bad Request"
How to solve this problem?