Chapter 15: Retrieving External Data Using URL Fetch

The App Engine does not allow you to set up your own socket connections to the outside world. It does allow you to perform HTTP requests on other servers, though. This chapter starts by showing that the basic URL connections in the Java language can also work on the Google App Engine. Then it shows how you can get more control over your HTTP connection using the low-level API. There is example code for how to post forms, handle exceptions, and fetch URLs asynchronously. The chapter ends with a discussion of how to reach web services, and it provides a few disclaimers on connection security.

Reading URLs Using GET Requests

The simplest use case of the URL Fetch API is to read data from another ...

Get Essential App Engine: Building High-Performance Java Apps with Google App Engine now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.