c#Dropbox通过httpwebrequest下载文件

阿卜杜

我有一个“ASP.NET”控制台应用程序,我使用的Dropbox APIhttps://content.dropboxapi.com/1/files/auto/<path> to download content from 我只是有AppKeyAppSecretAccess TokenToken Secretpath文件。

如何使用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] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章