I am wondering how I can check if the RestSharp request is called, which I made, because the server is not working, but something else.
When I turn off my server, I get the status code "NotFound", but it may not be found for a specific record (what I do on my site if I say that they are trying to find a record that can be deleted recently).
How can I understand that the server is actually not working?
Edit
here is my code
private readonly RestClient client = new RestClient(GlobalVariables.ApiUrl);
var request = new RestRequest("MyController", Method.POST);
request.AddParameter("UserId", "1");
request.AddParameter("Name", name.Trim());
var asyncHandle = client.ExecuteAsync(request, response =>
{
var status = response.StatusCode;
});
source
share