16.10. Accessing the REST API Directly

Now that you have worked with the StorageClient, I think it is useful to understand what is happening behind the scenes. In the previous example, you created a container to store your images, called pictures. You will now create an application to list all the containers in your local Azure storage by constructing the raw HTTP request.

16.10.1. How Do You Work with the REST API?

To interface with the Azure storage REST API, you will construct a request using the WebRequest classes. You need to do the following:

  1. Make an HTTP request to a URL and port. The following URL, for example, is used to retrieve a list of containers held in Azure storage:

    http://127.0.0.1:10000/devstoreaccount1/devstoreaccount1?comp=list ...

Get Introducing .NET 4.0: with Visual Studio 2010 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.