Saturday, April 11, 2009

HTTP User-Agent used by GAE/Java

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.

4 comments:

  1. Thanks for sharing your thoughts. Keep up the good job in posting very good topics.
    dissertation topics

    ReplyDelete
    Replies
    1. It was very useful for me. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us.
      Web developer

      Delete
  2. We can't compare website designers and developers but they come across to make website and we can't compare it with sumo wrestling.Buzz Applications

    ReplyDelete
  3. Gracious to view your website, I are most often onward to much more exceptional content material in addition to I do believe we all love to say thanks to pertaining to a lot of exceptional content material, webpage to discuss with us.nimble contact number

    ReplyDelete