O'Reilly logo

Mastering Cloud Development using Microsoft Azure by Marco Parenzan, Roberto Freato

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

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 ...

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