【问题标题】:c# Dropbox download file by httpwebrequestc# Dropbox通过httpwebrequest下载文件
【发布时间】:2015-12-13 07:14:41
【问题描述】:

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

如何使用 httpwebrequest 发送请求。

【问题讨论】:

标签: c# dropbox dropbox-api


【解决方案1】:

我在谷歌搜索,我在link找到了最佳答案:

 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;       
  }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-14
    • 1970-01-01
    • 1970-01-01
    • 2019-06-07
    • 1970-01-01
    相关资源
    最近更新 更多