I've spent a week reading about RESTful webservice and searching for a fully example to build my project above. When I reach a fully understanding of the REST webservice, I couldn't find any full implementation for it!
I was wondering why there's a lack in code samples of this great technique.
I want to implement it with PHP and Apache web server and make it fully and has all verbs like this tutorial [part-1] , [part-2] (see comments for links) saying:
The Basics of a RESTful Request
Every REST request consists of essentially the same basic parts:
- The URL – This is the URL we’ll be making a request against (often referred to as a resource).
- The Verb – GET, POST, PUT, or DELETE… there are some others out there, but these are the 4 most common ones.
- The Params – The parameters we’ll be supplying to the API, often referred to as the request body.
- Credentials – Username and password… we’ll cover HTTP Digest auth credentials.
And, of course, we’ll have a few pieces for our response as well:
- The Response Body – The actual response body the API gave us.
- The Response Status Code – The HTTP status code the API responded with.
- Other Response Info – We’ll also have some other interesting info in the response.
At first I tried this sample , but I found later that it doesn't follow REST standard rules.
After digging in the web I found this example but it doesn't give me the server code! Just the client code and processing response.
Do you know any common lib for REST that support both server-side and client-side ? with examples and docs? please give me your suggestions , it's urgent .