How to change User-Agent in UrlFetch Google App Engine?

Can I change the User-Agent from Google App Engine to UrlFetch ?

+6
python google-app-engine
source share
1 answer

Well, I found this, it is possible since SDK 1.2.1 was released ( Problem 342 ).
You just need to specify the User-Agent header:

urlfetch.fetch(url, headers = {'User-Agent': "MyApplication_User-Agent"}) 
+10
source share

All Articles