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
Mastering Cloud Development using Microsoft Azure

You're reading from   Mastering Cloud Development using Microsoft Azure Master the art of efficiently composing Azure services and implement them in real-world scenarios

Arrow left icon
Product type Paperback
Published in Jun 2016
Publisher Packt
ISBN-13 9781782173335
Length 352 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Marco Parenzan Marco Parenzan
Author Profile Icon Marco Parenzan
Marco Parenzan
Roberto Freato Roberto Freato
Author Profile Icon Roberto Freato
Roberto Freato
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Building Basic Services FREE CHAPTER 2. Enhancing the Hybrid Process 3. Building the Frontend 4. Building the Backend 5. Building the Mobile Experience 6. Building the API Layer 7. Working with Messages 8. Deploying Solutions in Azure Index

Building the API

A pure REST approach may use all of the HTTP methods detailed in the following table:

HTTP Verb

Sample URI

Task performed

GET

/cities/10

Retrieves the city with ID 10

DELETE

/cities/10

Deletes the city with ID 10

POST

/cities

Creates a new city

PUT

/cities/10

Updates the city with ID 10

PATCH

/cities/10

Performs a partial update to the city with ID 10

OPTIONS

/cities/10

Returns all the available operations on the city with ID 10

HEAD

/cities/10

Returns only the HTTP headers

However, in order to enforce compatibility with old clients of the platform with a restricted set of available HTTP options, we can also choose to be pragmatic and perform every operation with a single verb using HTTP headers to specify the operation, as follows:

POST http://api.cloudmakers.xyz/geo HTTP/1.1
Accept: application/json
x-cm-operation: PUT

This method requires an adapter at the API endpoint in order to provide routing to the appropriate operation type.

This...

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