answerWebAppQuery method
Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated.
On success, a SentWebAppMessage object is returned.
Implementation
Future<SentWebAppMessage> answerWebAppQuery(
String webAppQueryId, InlineQueryResult result) async {
var requestUrl = _apiUri('answerWebAppQuery');
var body = <String, dynamic>{
'web_app_query_id': webAppQueryId,
'result': jsonEncode(result),
};
return await HttpClient.httpPost(requestUrl, body: body);
}