Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • xumix 17 posts 109 karma points c-trib
    May 12, 2014 @ 17:39

    Api controller actions do not respect [System.Web.Mvc.HttpGet] attributes

    For example, I use

    public void NotifyUpdated(string authKey, DateTime date)

    But still get

    <Message>The requested resource does not support http method 'GET'.</Message>

    Same thing happens for all POST/PUT and other methods

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 12, 2014 @ 22:52
    Jan Skovgaard

    Hi Xumix

    What version of Umbraco are you using?


  • xumix 17 posts 109 karma points c-trib
    May 13, 2014 @ 09:23

    I should use System.Net.Http.HttpGet

  • Damian Green 452 posts 1433 karma points
    May 13, 2014 @ 11:03
    Damian Green

    I also had that if I didn't prefix my methods with the word Get (and I believe you don't need the attribute then - someone may correct me on that).

    So you could have

    public void GetNotifyUpdated(string authKey, DateTime date)
Please Sign in or register to post replies

Write your reply to: