post method
run executable telegram bot api
Implementation
Future<String> post({
required String url,
required Map<String, String> headers,
required String body,
required http.Client? httpClient,
}) async {
httpClient ??= http_client;
var uri = Uri.parse(url);
headers["cookie"] = cookies;
final response = await httpClient.post(uri, headers: headers, body: body);
var cookiesInfo = response.headers["set-cookie"]?.split(';');
if (cookiesInfo != null) {
cookies = addCookiesFromCookiesInfo(cookies, cookiesInfo);
}
return response.body;
}