【发布时间】:2014-10-09 07:55:44
【问题描述】:
我使用 ResponseWriter 下载带有 RestSharp 的流。
var client = new RestClient
var request = new RestRequest();
// ...
request.ResponseWriter = (ms) => {
// how to detect the status code
};
var response = client.Execute(request);
如何在 ResponseWriter 中找到 HTTP 状态码? 有没有更好的方法来下载 Stream?
【问题讨论】:
-
github.com/restsharp/RestSharp/wiki/Getting-Started 。 "如果您需要访问返回的 HTTP 状态代码,您可以在 RestResponse.StatusCode 中找到它"
标签: http stream http-status-codes restsharp