mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-22 15:46:36 +02:00
renamed check to checkHttpCode
This commit is contained in:
parent
60a5b799f9
commit
a732845db3
|
@ -135,7 +135,7 @@ final class OneDriveApi
|
|||
};
|
||||
writeln("Obtaining the url ...");
|
||||
http.perform();
|
||||
check();
|
||||
checkHttpCode();
|
||||
http.maxRedirects = 10;
|
||||
if (downloadUrl) {
|
||||
// try to download the file
|
||||
|
@ -174,7 +174,7 @@ final class OneDriveApi
|
|||
upload(localPath, url, http);
|
||||
// remove the if-match header
|
||||
if (eTag) setAccessToken(accessToken);
|
||||
check();
|
||||
checkHttpCode();
|
||||
return parseJSON(content);
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ final class OneDriveApi
|
|||
return parseJSON(.post(url, postData, http));
|
||||
}
|
||||
|
||||
private void check()
|
||||
private void checkHttpCode()
|
||||
{
|
||||
if (http.statusLine.code / 100 != 2) {
|
||||
throw new OneDriveException(format("HTTP request returned status code %d (%s)", http.statusLine.code, http.statusLine.reason));
|
||||
|
|
Loading…
Reference in a new issue