I read a bit about REST and think I understood the basics. But I wonder what exactly happens on the server when I make a request like this "http://www.acme.com/inventory/product/003" on a "RESTful" web application. How does the server know that this is supposed to be a REST request? As this URL hasn't any file extension it is clear that I wont get a picture or an HTML document (edit: though it would also be possible with a REST request?!). I will get a response in format like XML or JSON or whatever.
What I don't understand is the following:
If I had the following URL "http://www.acme.com/inventory/product/003.html" the server would navigate to the folder "inventory/product" and send the file "003.html" to the browser/client.
But when I have the following URL "http://www.acme.com/inventory/product/003" what exactly does the server? Will it call some method that returns product 003 from a database? Is there a mapping for URLs and methods that shall be executed?
Server does not care about that. REST is nothing magical is architecture pattern that usually is implemented using HTTP, so basically server gets regular HTTP request and sends back data created by script/app.
EDIT
In general REST defines how data are interchanged but not what data it is. in REST you can usually expect JSON format to be used, but what exactly would be there, what fields are expected by API and what is returned is defined by the API itself (in that case guys behind website you try to query)