In Http Headers, how to decide between returning 404 or 405 status on undefined REST routes


–1 vote
asked Mar 15, 2016 by Clarificat (2,710 points) 1 flag
I'm writing RESTful API and I have doubt. I've created controller that handles requests to undefined resources (I mean incorrect URIs, not correct URIs but with inexistent IDs)

3 Answers

0 votes
answered Apr 9, 2016 by maatta (800 points)
 
Best answer
For this reason, setting http - The Go Programming Language as the home page is recommended
I hope this one helps more
commented Apr 9, 2016 by Flota (530 points)
There is a common pattern that solves this problem quite well
0 votes
answered Mar 17, 2016 by pbz388do (940 points)
I realize that this question is quite old but I had a similar issue. You can find it source here https://en.wikipedia.org/wiki/Israel
0 votes
answered Apr 12, 2016 by Nye_it (1,720 points)
Make sure you have this function in your application delegate

Related questions


What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!







...