While the REST design philosophy has captured the imagination of web and enterprise developers alike, using this approach to develop real web services is no picnic. This cookbook includes more than 100 recipes to help you take advantage of REST, HTTP, and the infrastructure of the Web. You'll learn ways to design RESTful web services for client and server applications that meet performance, scalability, reliability, and security goals, no matter what programming language and development framework you use.
-
Chapter 1 Using the Uniform Interface
-
How to Keep Interactions Visible
-
When to Trade Visibility
-
How to Maintain Application State
-
How to Implement Safe and Idempotent Methods on the Server
-
How to Treat Safe and Idempotent Methods in Clients
-
When to Use GET
-
When to Use POST
-
How to Create Resources Using POST
-
When to Use PUT to Create New Resources
-
How to Use POST for Asynchronous Tasks
-
How to Use DELETE for Asynchronous Deletion
-
When to Use Custom HTTP Methods
-
When and How to Use Custom HTTP Headers
-
-
Chapter 2 Identifying Resources
-
How to Identify Resources from Domain Nouns
-
How to Choose Resource Granularity
-
How to Organize Resources into Collections
-
When to Combine Resources into Composites
-
How to Support Computing/Processing Functions
-
When and How to Use Controllers to Operate on Resources
-
-
Chapter 3 Designing Representations
-
How to Use Entity Headers to Annotate Representations
-
How to Interpret Entity Headers
-
How to Avoid Character Encoding Mismatch
-
How to Choose a Representation Format and a Media Type
-
How to Design XML Representations
-
How to Design JSON Representations
-
How to Design Representations of Collections
-
How to Keep Collections Homogeneous
-
How to Use Portable Data Formats in Representations
-
When to Use Entity Identifiers
-
How to Encode Binary Data in Representations
-
When and How to Serve HTML Representations
-
How to Return Errors
-
How to Treat Errors in Clients
-
-
Chapter 4 Designing URIs
-
How to Design URIs
-
How to Use URIs As Opaque Identifiers
-
How to Let Clients Treat URIs As Opaque Identifiers
-
How to Keep URIs Cool
-
-
Chapter 5 Web Linking
-
How to Use Links in XML Representations
-
How to Use Links in JSON Representations
-
When and How to Use Link Headers
-
How to Assign Link Relation Types
-
How to Use Links to Manage Application Flow
-
How to Deal with Ephemeral URIs
-
When and How to Use URI Templates
-
How to Use Links in Clients
-
-
Chapter 6 Atom and AtomPub
-
How to Model Resources Using Atom
-
When to Use Atom
-
How to Use AtomPub Service and Category Documents
-
How to Use AtomPub for Feed and Entry Resources
-
How to Use Media Resources
-
-
Chapter 7 Content Negotiation
-
How to Indicate Client Preferences
-
How to Implement Media Type Negotiation
-
How to Implement Language Negotiation
-
How to Implement Character Encoding Negotiation
-
How to Support Compression
-
When and How to Send the Vary Header
-
How to Handle Negotiation Failures
-
How to Use Agent-Driven Content Negotiation
-
When to Support Server-Driven Negotiation
-
-
Chapter 8 Queries
-
How to Design URIs for Queries
-
How to Design Query Responses
-
How to Support Query Requests with Large Inputs
-
How to Store Queries
-
-
Chapter 9 Web Caching
-
How to Set Expiration Caching Headers
-
When to Set Expiration Caching Headers
-
When and How to Use Expiration Headers in Clients
-
How to Support Caching for Composite Resources
-
How to Keep Caches Fresh and Warm
-
-
Chapter 10 Conditional Requests
-
How to Generate Last-Modified and ETag Headers
-
How to Implement Conditional GET Requests in Servers
-
How to Submit Conditional GET and HEAD Requests from Clients
-
How to Implement Conditional PUT Requests in Servers
-
How to Implement Conditional DELETE Requests in Servers
-
How to Make Unconditional GET Requests from Clients
-
How to Submit Conditional PUT and DELETE Requests from Clients
-
How to Make POST Requests Conditional
-
How to Generate One-Time URIs
-
-
Chapter 11 Miscellaneous Writes
-
How to Copy a Resource
-
How to Merge Resources
-
How to Move a Resource
-
When to Use WebDAV Methods
-
How to Support Operations Across Servers
-
How to Take Snapshots of Resources
-
How to Undo Resource Updates
-
How to Refine Resources for Partial Updates
-
How to Use the PATCH Method
-
How to Process Similar Resources in Bulk
-
How to Trigger Bulk Operations
-
When to Tunnel Multiple Requests Using POST
-
How to Support Batch Requests
-
How to Support Transactions
-
-
Chapter 12 Security
-
How to Use Basic Authentication to Authenticate Clients
-
How to Use Digest Authentication to Authenticate Clients
-
How to Use Three-Legged OAuth
-
How to Use Two-Legged OAuth
-
How to Deal with Sensitive Information in URIs
-
How to Maintain the Confidentiality and Integrity of Representations
-
-
Chapter 13 Extensibility and Versioning
-
How to Maintain URI Compatibility
-
How to Maintain Compatibility of XML and JSON Representations
-
How to Extend Atom
-
How to Maintain Compatibility of Links
-
How to Implement Clients to Support Extensibility
-
When to Version
-
How to Version RESTful Web Services
-
-
Chapter 14 Enabling Discovery
-
How to Document RESTful Web Services
-
How to Use OPTIONS
-
-
Appendix Additional Reading
-
Books
-
References
-
-
Appendix Overview of REST
-
Uniform Resource Identifiers
-
Resources
-
Representations
-
Uniform Interface
-
Hypermedia and Application State
-
-
Appendix HTTP Methods
-
OPTIONS
-
GET
-
HEAD
-
POST
-
PUT
-
DELETE
-
TRACE
-
-
Appendix Atom Syndication Format
-
Key Elements of Feeds and Entries
-
Other Atom Elements to Consider
-
-
Appendix Link Relation Registry
-
alternate
-
appendix
-
bookmark
-
chapter, section, subsection
-
contents
-
copyright
-
current
-
describedby
-
edit
-
edit-media
-
enclosure
-
first, last, next, next-archive, prev, previous, prev-archive, start
-
glossary
-
help
-
index
-
license
-
payment
-
related
-
replies
-
self
-
service
-
stylesheet
-
up
-
via
-
-
Colophon
- Title:
- RESTful Web Services Cookbook
- By:
- Subbu Allamaraju
- Publisher:
- O'Reilly Media / Yahoo Press
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- March 2010
- Ebook Release:
- February 2010
- Pages:
- 320
- Print ISBN:
- 978-0-596-80168-7
- | ISBN 10:
- 0-596-80168-8
- Ebook ISBN:
- 978-1-4493-8248-3
- | ISBN 10:
- 1-4493-8248-7
The animal on the cover of RESTful Web Services Cookbook is a great fringed lizard or Hatteria punctata. Hatteria, more commonly known as tuatara, are endemic to New Zealand; "tuatara" is a native Maori word meaning "peaks on back" (referring to their spiky, or fringed, spines). The name "great fringed lizard" is a misnomer; though they resemble common lizards, tuatara are quite different anatomically, and, unlike lizards, they're nocturnal and enjoy cool weather. Misclassified as lizards by the British Museum in 1831, tuatara were reclassified by zoologist Albert G nther in 1867 as Rhynchocephala, an order from which many Mesozoic fossil species are known. In fact, some scientists refer to these reptiles, the only living representative of Rhynchocephala, as "living fossils."
Tuatara grow very slowly-they don't reach maturity until they are 13-20 years old and don't stop growing until they are about 30. It is believed that tuatara in the wild can reach the impressive age of 80 or older. Their average length is 20-31 inches and they weigh 1-3 pounds. They can be gray, olive, or brick red, and their coloring can change over their lifetime. As adults, they shed their skin at least once per year. Other physical characteristics include a diapsid skull (two openings on either side), a lack of external ears, acrodont tooth structure (meaning the teeth are fused to the jawbone-another fact that distinguishes tauatara from lizards), and a third eye. This third eye grows on top of the head-under the skin in adults-and has a retina, lens, and nerve endings, although it is not used for seeing. It is, however, sensitive to light and is thought by some to help the tuatara detect the time of day or season.
Despite an endangered status, the tuatara maintains high visibility in and around New Zealand. Until October 2006, it was featured on one side of New Zealand's 5-cent piece, but the coin has since been phased out. The reptiles also figure prominently in Maori culture; they are esteemed as ariki (god forms). According to indigenous legends, they're messengers of Whiro, the god of death and disaster, and Maori women are forbidden to eat them. They also represent tapu, the line marking all things sacred and beyond which lie potentially serious consequences (manu). Maori women have been known to tattoo lizards or tuatara near their genitals to symbolize the concept of tapu. Today, tuataras are regarded as a taonga (treasure), and as the kaitiaki (guardian) of the trails to the mental and spiritual realms that give humans life.
The cover image is from Wood's Animate Creation. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSansMonoCondensed.

