Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

ApplicationService Methods #20


User avatar
0
merlop created

Hey! How can I change the method of the application services from the standart POST to GET? Simple [HttpGet] attribute is not working T_T


3 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Application layer is independed from web api layer. So, you can not use Web API attributes here. It currently supports only POST (See docs: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API#DocDynamicApi">http://www.aspnetboilerplate.com/Pages/ ... DynamicApi</a>). But in near future, we will implement Get, Delete and other Http verbs.

    Dynamic web api layer is used to simple map application service methods to web api actions. You can use web api controllers as usual if you need custom web api actions.

  • User Avatar
    0
    merlop created

    The way I'm making atm is to give a input with bool parameter. Still being POST, but used like GET. I like the way dynamic webapi layer works and I still preffer this than doing an mvc webapi controller just to GET methods... thanks for the help! :D :D :D

  • User Avatar
    0
    hikalkan created
    Support Team

    Start your GET methods by Get. Example:

    GetPhonesOutput GetPhones();
    

    When I implement it, there will be a conventional option for method prefixes:

    POST: Save, Update, Insert GET: Get DELETE: Delete, Remove ...