我试着遵循这个CloudRail示例。
这是我的代码:
OneDrive client = new OneDrive(new LocalReceiver(8082), CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, "");
//I'm not sure about the parameter 'state' so I left an empty string here
//The REDIRECT_URI is "https://login.live.com/oauth20_desktop.srf"
InputStream inputStream = new FileInputStream(fileToUpload);
client.upload(fileToUpload.getPath(), inputStream, fileToUpload.length(), false);我发现了一个错误:
com.mashape.unirest.request.HttpRequestWithBody :java.lang.ClassNotFoundException
在第一行。
请帮帮忙。
发布于 2017-10-06 08:32:36
在集成Github的普通.jar文件时,还需要包含unirest库,因为它是CloudRail SDK中必需的。您可以在这里下载:https://github.com/Mashape/unirest-java
https://stackoverflow.com/questions/46580032
复制相似问题