
上QQ阅读APP看书,第一时间看更新
Request and response
Now that we have had a quick look at the demo ValuesController, let's examine exactly how the client sends the request and how it receives the response.
A REST request generally consists of the following:
- HTTP verb: This denotes what kind of operation the requests want to perform on the server.
- Header: This element of the REST request allows the client to pass more information about the request.
- URL: The actual path to the resource that the REST request wants to operate on.
- Body: The body can contain extra data related to a resource to identify or update it. This is optional though.