PUT /api/books/<id>

We will use PUT in our REST API to update a specific resource type. PUT defined in our API is stringent with accepting the payload without complete data, that is, it will reject with incomplete payloads.

In this example, we will modify the newly created book "3" and change its link to point at "http://link-to-book-15.com":

// Request 
PUT "<URL>/api/books/3" 

// payload 
{ 
   "title": "book5", 
   "link": "http://link-to-book-15.com" 
 } 
 
 // response 
 { 
    "id": "3", 
    "title": "book5", 
    "link": "http://link-to-book-15.com" 
  }
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.181.36