Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Restful Client Query

by perlfan (Vicar)
on Jun 29, 2016 at 02:32 UTC ( [id://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 (Archbishop) 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-16 23:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found