diff --git a/examples/.htaccess b/examples/.htaccess index bc4b75b..d99b7db 100644 --- a/examples/.htaccess +++ b/examples/.htaccess @@ -13,3 +13,5 @@ SetOutputFilter DEFLATE Header unset Vary Header add Vary Accept-Encoding +Redirect /examples/feed-302.xml http://diveintopython3.org/examples/feed.xml +Redirect permanent /examples/feed-301.xml http://diveintopython3.org/examples/feed.xml diff --git a/http-web-services.html b/http-web-services.html index 4c7b5ee..6b28d04 100644 --- a/http-web-services.html +++ b/http-web-services.html @@ -23,7 +23,7 @@ mark{display:inline}

Diving In

HTTP web services are programmatic ways of sending and receiving data from remote servers using nothing but the operations of HTTP. If you want to get data from the server, use HTTP GET; if you want to send new data to the server, use HTTP POST. Some more advanced HTTP web service APIs also define ways of modifying existing data and deleting data, using HTTP PUT and HTTP DELETE. In other words, the “verbs” built into the HTTP protocol (GET, POST, PUT, and DELETE) map directly to application-level operations for retrieving, creating, modifying, and deleting data. -

The main advantage of this approach is simplicity, and its simplicity has proven popular with a lot of different sites. Data — usually XML data — can be built and stored statically, or generated dynamically by a server-side script, and all major programming languages (including Python, of course!) include an HTTP library for downloading it. Debugging is also easier; because each “call” to the web service had a unique URL, you can load it in your web browser and immediately see the raw data. +

The main advantage of this approach is simplicity, and its simplicity has proven popular. Data — usually XML data — can be built and stored statically, or generated dynamically by a server-side script, and all major programming languages (including Python, of course!) include an HTTP library for downloading it. Debugging is also easier; because each “call” to the web service had a unique URL, you can load it in your web browser and immediately see the raw data.

Examples of HTTP web services: