REST URL design – multiple resources in one HTTP call [duplicate]

Based on your response, the answer to your question is to create a new resource that contains that single set of information. e.g. GET /Customer/1212/RecentPurchases Creating composite urls that have many identifiers in a single url limits the benefits of caches and adds unnecessary complexity to the server and client. When you load a web … Read more

Does it make sense to have max-age and s-maxage in the Cache-Control HTTP header?

From HTTP Header Field Definitions: 14.9.3 Modifications of the Basic Expiration Mechanism … s-maxage If a response includes an s-maxage directive, then for a shared cache (but not for a private cache), the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header. … Note, … Read more

Is there any reason not to use HTTP PUT and DELETE in a web application?

Actually a fair amount of people use PUT and DELETE, mostly for non-browser APIs. Some examples are the Atom Publishing Protocol and the Google Data APIs: http://www.ietf.org/rfc/rfc5023.txt http://code.google.com/apis/gdata/docs/2.0/basics.html Beyond that, you don’t see PUT/DELETE in common usage because most browsers don’t support PUT and DELETE through Forms. HTML5 seems to be fixing this: http://www.w3.org/TR/html5/forms.html#form-submission-0 The … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)