Chapter 1. Working with RESTful Services

The Twitter API is the Schrödinger's cat of web service APIs. Until you call it, you never know if it's alive or dead. Sometimes the mere act of calling it is enough to kill it.

Scott Koon, Witty

Before you can learn to run with the Twitter API, you first must walk with the web. The Representational State Transfer (REST) pattern, and the RESTful services that follow its principles, provide an intuitive layer over traditional HTTP programming that is a widely adopted standard among modern web sites, and Twitter is no exception. In this chapter you will learn how to consume REST services with .NET, some nuances of the Hypertext Transfer Protocol (HTTP) programming model, and how they fit together. This will prepare you to take on the Twitter API at its deepest levels, using all options available to you to control your development experience and get the most out of your custom applications.

What is REST?

REST is a philosophy of web architecture, derived from a service-oriented approach and characterized by a transparent interface over HTTP. REST is designed to demonstrate a low barrier to entry for web developers, and encourages the design of scalable, discoverable web programming. REST itself is not a protocol or a messaging system; everything needed to consume REST services is found in existing technologies. Commonly, REST principles behave like web services, adopting their nature to cleanly separate the implementation details of a resource from ...

Get Professional Twitter® Development With Examples in .NET 3.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.