Pradeep Rawat

Pradeep Rawat

  • NA
  • 286
  • 8.5k

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. }  

Answers (6)