i have two projects in my solution. i wanna call web api method other in project.
i don't wanna call like below code.
var client = new HttpClient() var addressResult = client.PostAsJsonAsync("http://localhost:5655/api/services/app/Address/GetAddressById", addressModel).Result;
Do you have any advice this situation?
Thank you for your help.
4 Answer(s)
-
0
Hi,
ABP has a IAbpWebApiClient interface to make it simpler. While it needs enhancement, works properly. See demo: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/ConsoleRemoteWebApiCall">https://github.com/aspnetboilerplate/as ... WebApiCall</a>
-
0
I solved. Thank you for help
-
0
IAbpWebApiClient only has PostAsync method to send HTTP POST request
may i know whether it has PUT , GET method as well? If yes can you please give some example? Thanks a lot
-
0
Hi,
You are right, it does not conitan PUT or GET at the moment but you can implement them easily in your project.
Thanks.