Testing REST web services
Representational State Transfer (REST) is an architectural style of designing network applications that relies on a stateless client-server and cacheable communications protocol (HTTP). Compared to alternatives such as Remote Procedure Calls (RPC), Simple Object Access Protocol (SOAP), and so on, REST is lightweight, mainly because all communications between the client and server are over HTTP. This makes them easily testable as well.
REST web services adhere to the principles of REST and rely on the following HTTP methods: GET, PUT, POST, and DELETE. GET is used to list or retrieve resource(s), PUT is used to replace or update resource(s), POST is used to create a new resource, and DELETE is used to delete resource(s). Since REST is an architectural style and not a protocol, there is no official standard. The only constraints are to stick to the guidelines laid out by REST.
How to do it…
In this recipe, we will cover how to test REST web services. Perform...