Подключаюсь к Google drive api
Хочу скачать оттуда файл с расширением .dat
Картинка jpeg с помощью TMemoryStream скачивается нормально
Запрос строю так
RESTResponseDataSetAdapter1.AutoUpdate := false;
RESTRequest1.Params.Clear;
RESTRequest1.ClearBody;
RESTRequest1.Method := rmGET;
RESTClient1.BaseURL :=
'https://www.googleapis.com/drive/v2/files/{FileId}?alt=media';
RESTRequest1.Resource := '';
RESTRequest1.Params.AddUrlSegment('FileId', FileID);
try
RESTRequest1.Execute;
except
on e: Exception do
begin
Clipboard.AsText := e.Message;
ShowMessage(e.Message); // Show Exception
end;
end;
Но для .dat файла на строчке RESTRequest1.Execute;
выскакивает исключение
REST request failed: No mapping for the Unicode character exists in the target multi-byte code page
В чем ошибка? Как надо скачивать?