Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 530.1k

How to display message

Dec 29 2022 4:55 AM

Hi

I have below code . I want if it is success then Successful message is displayed else error message or what is the return response of API

var body = new JavaScriptSerializer().Serialize(objShippingOrdr);
var client = new RestClient("htps://api.nimbuspost.com/v1/shipments");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

Thanks


Answers (3)