REST and HTTP
JAX-RS provides API to work with the six HTTP methods. These methods are used to interact with the web servers through a browser or some other client; look at the details.
GET methods
GET is the most used. It lets you accommodate the address data of the requested page, followed by the name of the page, a question mark, and the name/value pairs of data that interest us. Name and value are separated by an equals sign. The different name/value pairs are separated by &
. So, imagine having the product.html
page that shows the characteristics of a product passing the code and the category of the product itself. To show the A7 product data category 2, we will have to call up the page like this:
<a href="product.html?cod=a7&cat=2">
The string that is after the question mark, containing the names and values of the parameters, is called a query string. When the product.html
page is called up in this way, it will be elaborated by a web server. So, to return to the example of...