REST API for uHotelBooking reservation system
Rest api for uhotelbooking reservation system.
Rest is the underlying architectural principle of the web. The amazing thing about the web is the fact that clients (browsers) and servers can interact in complex ways without the client knowing anything beforehand about the server and the resources it hosts.
The key constraint is that the server and client must both agree on the media used, which in the case of the web is html. An api that adheres to the principles of rest does not require the client to know anything about the structure of the api. Rather, the server needs to provide whatever information the client needs to interact with the service.
An html form is an example of this: the server specifies the location of the resource, and the required fields. The browser doesn t know in advance where to submit the information, and it doesn t know in advance what information to submit. Both forms of information are entirely supplied by the server.
(this principle is called hateoas. ) so, how does this apply to http, and how can it be implemented in practice? Http is oriented around verbs and resources. The two verbs in mainstream usage are get and post, which i think everyone will recognize. However, the http standard defines several others such as put and delete.
These verbs are then applied to resources, according to the instructions provided by the server. We provide resp api module for uhotelbooking script. There are site admins or hotel owners who can access protected site data.