sendHTTPMessage method
Implementation
Future<TOCKResponse> sendHTTPMessage(String query) async {
String body = json.encode(
{'query': query, 'userId': userId, 'locale': language});
developer.log(body);
var responses = await authenticatorTOCK.post(headers: {
HttpHeaders.contentTypeHeader: 'application/json',
HttpHeaders.contentEncodingHeader: 'charset=utf-8'
}, body: body);
return TOCKResponse(
responses: json.decode(utf8.decode(responses.bodyBytes)));
}