O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

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

Time for action — deleting a database In CouchDB

In this exercise, we'll call a DELETE request to delete the another-db database.

  1. Delete another-db by running the following command in Terminal:
    curl -X DELETE http://localhost:5984/another-db
    
    
  2. Terminal will respond with the following:
    {"ok":true}
    
    

What just happened?

We used Terminal to trigger a DELETE method to CouchDB's RESTful JSON API. We passed the name of the database that we wanted to delete, another-db, at the end of the root URL. When the database was successfully deleted, we received a message that everything went okay.

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