What Does Actually Mean Rest-Style Url [Duplicate]
Possible Duplicate: What Is Rest, and What Is Its Advantage This Is Some from Book Wahhp Although Urls Containing Parameters Within the Query String Do...
Possible Duplicate:
what is rest,and what is its advantage
This is some from book WAHHP
Although URLs containing parameters within the query string do themselves conform to REST constraints, the term “REST-style URL” is often used to signify a URL that contains its parameters within the URL file path, rather than the query string. For example, the following URL containing a query string: corresponds to the following URL containing “REST-style” parameters:
I actually can not understand what above means. How can I design rest-style URLs in my applications? Generally, can you explain the difference and implementation methods?
What is means is instead of a URL like:
/page.php?id=202&date=07112012
your URL would be:
/page/202/07112012/ or /{page}/{id}/{data}
Instead of creating a series of parameters I built the parameters into the structure of the URLs. There are many frameworks depending on what technology you are using that will allow you to create URLs that are structured like this.
In REST applications you can use the same URL to make any actions depending of the HTTP verb.
The follow URL http: can DELETE, SHOW or EDIT user with ID 1.
To DELETE a user, send a request with a DELETE verb, to SHOW use GET ver and to EDIT use the POST verb with your parameters.
To more information read: