In order to efficiently work with REST and RESTful web service, good knowledge of HTTP is really helpful. Even though REST seems easy, designing a uniform and consistent RESTful API is a tough job. One of the tricky tasks is choosing right the HTTP method for right job e.g. when to use PUT vs POST. Once you know the meaning and purpose of different HTTP methods, it helps to choose the right method for the right job. You can divide HTTP methods into two main categories safe and idempotent. Safe methods are HTTP methods that do not modify the resource e.g. a GET request is safe because it doesn't modify the resource you are requesting e.g. data of a Book. Another safe HTTP method is HEAD, which doesn't change the resource representation on the Server, but all other HTTP methods e.g. POST, PUT, or DELETE are non-safe.
Read more »
Showing posts with label Java Web Service Tutorial. Show all posts
Showing posts with label Java Web Service Tutorial. Show all posts
Tuesday, 31 May 2016
Sunday, 10 April 2016
What is purpose of different HTTP Request Types in RESTful Web Service?
RESTful web services heavily rely on HTTP by design. They use different HTTP methods to perform their job and uses HTTP response code to inform clients about success or failure of a particular request. REST stands for Representational State transfer and it uses HTTP to allow two systems to communicate via remote calls. RESTFul web services is a collection of REST URI which points to resources. These URI can point to a single resource of a collection of resource. For example, you would expect /employee/101 to contain details employee with 101 and /employees to return a list of all employees. In RESTFul web service, HTTP request types signify the action to take for the resource.
Read more »
Subscribe to:
Posts (Atom)