Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PhoneGap By Example

You're reading from   PhoneGap By Example Use PhoneGap to apply web development skills and learn variety of cross-platform mobile applications

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781785285318
Length 368 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Installing and Configuring PhoneGap FREE CHAPTER 2. Setting Up a Project Structure with Sencha Touch 3. Easy Work with Device – Your First PhoneGap Application "Travelly" 4. Integrating the Travelly Application with Custom Service 5. Crazy Bubbles - Your First HTML5 Mobile Game 6. Share Your Crazy Bubbles Game Result on Social Networks 7. Building a Real-time Communication Application – Pumpidu 8. Building "Imaginary" – An Application with Instagram-like Image Filters 9. Testing the PhoneGap Application 10. Releasing and Maintaining the Application Index

Discovering the REST API


Very often, we need to get data from a publicly available Internet service, send it over the Internet, and delete or modify it. We can do it all with REST APIs. We can have different URIs for different business models. Let's imagine that we need to make our products available in an Internet shop. To retrieve information about a specific product, we will perform a GET request to the /product/1 address, where 1 is the ID of the product. We can delete a product by making the DELETE request to the same resource. Similarly, we can use the PUT request to update the product and the POST request to create the product. The GET, POST, PUT, and DELETE methods are very often called verbs. In brief, the REST API consists of:

  • HTTP methods:

    • GET: This is mainly used to retrieve data. It sends parameters in headers

    • PUT: This is used mainly to update a remote resource

    • DELETE: This is used to delete a resource

    • PATCH: This is used to update partial resources

    • POST: This submits data to...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image