[英]How get the response header with RESTSharp?
我正在开发一个调用 API 的程序,一切正常,但我必须恢复响应头上的一些信息,我该如何恢复这些信息?
我尝试过类似的东西: string h = response.Headers;
但它不起作用。
var client = new RestClient("https://xxxx.com/");
client.Authenticator = new HttpBasicAuthenticator("user", "password");
var request = new RestRequest("xx/xx/xx", Method.GET);
IRestResponse response = client.Execute(request);
var xml_text = response.Content;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.