Pradeep Rawat

Pradeep Rawat

  • 1.9k
  • 59
  • 418

How to consume other API into our Webapi

Sep 18 2020 2:28 AM
Sorry , I am new in web api actually when I am running my API on postman the response is correct.but when i am implementing in code its giving internal server code error.
  1. var gizmo = new Product() { ChannelId= "948404"};  
  2. HttpResponseMessage response = await client.PostAsJsonAsync("https://xxx-xxxxxx-api.xxx.co/api/bills, , gizmo);  
  3. if (response.IsSuccessStatusCode)  
  4. {  
  5. }  

Brought to you by:

Answers (6)