An answer to the following question Difference between RESTful webservice and HttpServlet says "REST is really an architectural style used when designing an API on a server. HttpServlets can be a method of implementing a RESTful web service".
In that case, can i say that if i implement an HTTPServlet that can get a resource, let's say it accepts unique Employee Id and returns Employee object as atleast partially RESTful web service?
For example, Let's say i have written a servlet which accepts a unique employee id, and returns a JSON string that represents an employee object. This object includes Id, name & designation of that employee. The url looks like : http://hostname:port/Rest/Employee/{id} .
Here id is the unique id for an employee. The following request gets me an employee with id as 1001:
http://hostname:port/Rest/Employee/1001
The response is a string, which looks like:
{"id": "1001", "name":"ayushi", "designation":"software engineer"}
My question here is: Can i call this as a RESTful web service?