Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Restful Client Query

by perlfan (Curate)
on Jun 29, 2016 at 02:32 UTC ( #1166833=note: print w/replies, xml ) Need Help??

in reply to Re: Restful Client Query
in thread Restful Client Query

If implemented halfway consistently, using the wrong HTTP method (i.e., GET when a POST, etc is required) should result in a 404.

Replies are listed 'Best First'.
Re^3: Restful Client Query
by Your Mother (Bishop) on Jun 29, 2016 at 05:19 UTC

    You mean 405?

      I don't know for sure, but in REST I've always considered the resource to be defined by METHOD+route; if POST+/foo/bar exists, but GET+/foo/bar doesn't, then I'd accept a 404. But idk really since everyone has their own interpretation. I could also just be completely ignorant. That is a good possibility.

        :P I agree there are some gray areas but in this case I think it's pretty clearly 405. The path exists, it's just limited to what method is allowed.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1166833]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-11-21 12:36 GMT
Find Nodes?
    Voting Booth?
    My code is most likely broken because:

    Results (239 votes). Check out past polls.