putSync method
Implementation
Future<T> putSync({required TGPutRequest request}) async {
try {
Uri uri = Uri.parse(request.getUrl());
TGLog.t("PUT", uri);
TGRequestContent content =
TGRequestContent(request.body(), request.headers());
final httpRes = await _getClient(request.getUri(), "PUT").put(
uri,
body: content.body,
headers: content.headers,
);
return Future.value(_prepareResponse(httpRes));
} catch (error) {
T t = _populateExceptionResponse(error);
return Future.value(t);
}
}