Example 1:
http://www.example.com/image/logo.png
http://www.example.com/images/logo.png
Example 2:
http://www.example.com/user/johndoe
http://www.example.com/users/johndoe
Especially if you use the Url as REST API. (Example 2)
Which one is recommended and why?
For REST, i mainly use the plural form to indicate a path to the resource. But you also have to take the Cacheablility, Frequency of Change and the Mutability of the Resource. In my case, collections of the resource is mainly the case, so i had used the plural form.
The reason for this is that for example:
will serve the URI to GET the user johndoe which belongs to your collection of users.
will be used as the URI to GET all users and can be easily be used on query url like:
creating a new user will still use the same URL then using POST & passing the parameters:
for refs you may want to check the Oreilly book RESTful Web Services Cookbook