This commit is contained in:
estevez-dev
2019-03-18 23:37:45 +02:00
parent 5140840d3a
commit d70ba0a55a
10 changed files with 103 additions and 4 deletions

View File

@ -578,6 +578,22 @@ class HomeAssistant {
return [];
}
}
Future sendHTTPRequest(String data) async {
String url = "$homeAssistantWebHost/api/notify.fcm-android";
Logger.d("[Sending] ==> $url");
http.Response response;
response = await http.post(
url,
headers: {
"authorization": "Bearer $_password",
"Content-Type": "application/json"
},
body: data
);
//var resData = json.decode(response.body);
Logger.d("[Received] <== ${response.statusCode}, ${response.body}");
}
}
class SendMessageQueue {