O'Reilly logo

Lift Application Development Cookbook by Gilberto T. Garcia Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying data using the REST service

We now know how to build a REST API to fetch and create data, but what if our client has moved to a new office or changed their phone number?

We will need to have a way to modify our client's data and this is what we will learn in this recipe.

Getting ready

We will keep evolving the code that we have created in the last recipe. So, again, you can duplicate the last section's project or just modify it.

  1. In the index.html file, create a new column in the table to hold the edit link:
    <th>Edit</th>
  2. Create a new function called createLine, which should have the same code as the createClient's newLine variable. This code is as follows :
     var createLine = function(data) { return <place the code from the newLine variable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required