Tag Info

New answers tagged

1

404 indicates a resource is not found. A more appropriate response code would be a 409 with a body containing more details if the nature of the conflict.


0

404 means resource not found. Using it here would be not appropriate. Because the resource clearly exists, but cannot be manipulated. According to Quick Tips (http://www.restapitutorial.com/lessons/restquicktips.html) 409 Conflict would be a good way to go. You can of course return 200 with error message in the body. The client is still responsible for ...


0

The primary answer is that a link in a web page is intended to be rendered as a web page. If the web server returns some type other than a renderable page (image, downloaded file, etc), then the content might be rendered by the browser or not (it might be saved as a file). There is no way for a link in a web page that leads to a CSS file or a JavaScript ...


0

The resource for "About Us" is ... Us :) er, You. Think about the attributes of You that you want to publicize, and roll those up as a noun with a representation. Those values don't have to come from a database... it will probably be a bunch of string values, and those can come from config, or maybe even hard-coded in a class.


0

I would keep my view's independent of the back-end. You can ask the back-end for resources such as things that go on the accordion, the navigation bar, and other objects that pertain to the body. However, you should leave the processing of these resource representations to your client code, which will eventually render them as per the requirements.


1

I would prefer to design these as subresources, onto which you perform a POST request. Consider you have a resource at /instance/type/1, I would have the representation of that resource convey a couple of links to 'actions' that can be performed on the resource, such as /instance/type/1/draft and /instance/type/1/curate. In JSON, this could be as simple as: ...



Top 50 recent answers are included