“Unable to connect to the remote server” when I call a rest Api

情到浓时终转凉″ 提交于 2021-02-11 13:22:11

问题


I am getting Unable to connect to the remote server response when I call a rest API

var client = new RestClient { BaseUrl = new Uri(ConfigurationManager.AppSettings["WalletUrl"]) };
var hgh = ConfigurationManager.AppSettings["GetWalletRequest"];
var requests = new RestRequest(Method.POST)
{
    RequestFormat = DataFormat.Json
};
requests.AddHeader("content-type", "application/json");
requests.AddParameter("application/json", req, ParameterType.RequestBody);
requests.AddBody(req);
var response = client.Execute(requests);

来源:https://stackoverflow.com/questions/56740577/unable-to-connect-to-the-remote-server-when-i-call-a-rest-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!