#if C
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPClient.h>
void setup(B4R::Object* o){
const char *host = "http://mypage.com";
}
void read (B4R::Object* o) {
HTTPClient http; //Declare object of class HTTPClient
String temperature, humidity, getData, Link;
//String getData, Link;
temperature="77.77"; <--- Here I hardcoded the value
humidity="99.99"; <----Here I hardcoded the value
//GET Data
getData = "?temperature=" + temperature + "&humidity=" + humidity ; //Note "?" added at front
Link = "http://mypage.com/addTemperature.php" + getData;
http.begin(Link); //Specify request destination
int httpCode = http.GET(); //Send the request
String payload = http.getString(); //Get the response payload
Serial.println(httpCode); //Print HTTP return code
Serial.println(payload); //Print request response payload
http.end(); //Close connection
}
#End if