我有一个“ASP.NET”控制台应用程序,我使用的Dropbox APIhttps://content.dropboxapi.com/1/files/auto/<path> to download content from
我只是有AppKey
,AppSecret
,Access Token
,Token Secret
和path
文件。
如何使用httpwebrequest发送请求。
我在Google中搜索,并在链接中找到了最佳答案:
string url = String.Format("https://content.dropboxapi.com/1/files/auto{0}?oauth_consumer_key={1}&oauth_token={2}&oauth_signature={3}%26{4}", path, app-key, access-token, app-secret, access-token-secret);
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Method = "Get";
WebResponse webResponse = null;
try
{
webResponse = webRequest.GetResponse();
return webResponse.GetResponseStream();
}
catch (Exception ex)
{
throw ex;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句