Fetching a file over HTTP using GAE/Java is easy:
URL url = new URL("http://www.example.com/file.txt");
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
The request sent by the Google App Engine servers will have the following properties:
HTTP_ACCEPT_ENCODING = gzip
HTTP_REFERER = http://your-app-id.appspot.com/
HTTP_USER_AGENT = AppEngine-Google; (+http://code.google.com/appengine)
REMOTE_ADDR = 64.233.172.6 (probably varies)
SERVER_PROTOCOL = HTTP/1.1
Please note that the referer field contains the app-id of the application that generated request, which allows for identification of the source of the request.
0 comments:
Post a Comment