初步实现功能
This commit is contained in:
1 parent
f23c6a3fbb
commit
f0b6efb126
15 files changed
+783
-708
No files matched your search
@@ -268,7 +268,9 @@ namespace seafile::api {
|
||||
header.emplace("range", range);
|
||||
if (const auto &response = cpr::Get(url, header);
|
||||
response.error || (response.status_code != 200 && response.status_code != 206)) {
|
||||
return tl::make_unexpected(SeafileException{std::format("HTTP Error:{}", response.status_code)});
|
||||
return tl::make_unexpected(SeafileException{
|
||||
std::format("Download bytes range {} failed, HTTP Error:{}", range, response.status_code)
|
||||
});
|
||||
} else {
|
||||
return response.text;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user