/jquery-ajax-delete

Primary LanguageJavaScriptOtherNOASSERTION

General Assembly Logo

jQuery AJAX DELETE

Prerequisites

Objectives

Make HTTP requests using curl, and AJAX for:

  • Deleting a resource.

Preparation

Set up the client:

  1. Fork and clone this repository.
  2. Create and checkout a new branch (training).
  3. Install dependencies with npm install.

We'll make requests of and receive responses from the library-api:

  1. Open a new terminal (window or tab).
  2. Change into the directory where your library-api lives.
  3. Run rails s or rails server to start the API(they do the same thing).

We're now ready to make requests.

Deleting data from an API

DELETE /books/:id

  1. Delete /books/:id using curl
  2. Make a form to delete books
  3. Delete /books/:id using AJAX
  1. All content is licensed under a CC­BY­NC­SA 4.0 license.
  2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.