D
D
Devil Devil2016-08-16 20:22:46
API
Devil Devil, 2016-08-16 20:22:46

How to call api controller from mvc controller?

Good evening! There is an application layer (a separate project) with api controllers. How to call it from a regular controller?
5a393441c40040dfbca363fe6d3c9300.JPG
when you try to do something similar, it works, but it's not clear how to pass parameters in this way?
i.e., this doesn't work anymore
0eebef4195514b6190ab186f768bd13b.JPG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Георгий Григорьев, 2016-08-28
@IamKarlson

у вас url кривой получается скорее всего
http://localhost:56543/api/Country/{id}/ в браузере открыть попробуйте. Никакой магии в api контролерах нет, работает как обычный http сервер, так что проверьте из браузера заработает или нет

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question