after getting response of first Rest request can't get response of second
Rest request
Using RestSharp I want to use a webservice from a Windows Forms
application using C# to make a desktop application.
I am getting a response from the first request, but when I send another
request I get an error because of a timeout.
This is the first request at load event:
var client = new RestClient();
client.BaseUrl = "link of webservice url";
client.Authenticator = new DigestAuthenticator("*****", "*****");
var request = new RestRequest();
request.AddParameter("key", "******************************");
IRestResponse response = client.Execute(request);
This is the second request at button click event:
var client = new RestClient();
client.BaseUrl = "link of webservice url";
client.Authenticator = newDigestAuthenticator("******","******");
var request = new RestRequest();
request.AddParameter("city",cityname);
request.AddParameter("key", **********************");
IRestResponse response = client.Execute(request);
No comments:
Post a Comment