GAM user agent on short URL

This commit is contained in:
Jay Lee
2019-08-15 18:21:54 -04:00
parent 5f94263db2
commit b3dfa41df6

View File

@@ -7634,7 +7634,8 @@ class ShortURLFlow(google_auth_oauthlib.flow.InstalledAppFlow):
simplehttp = _createHttpObj()
simplehttp.timeout = 10
url_shortnr = 'https://gam-shortn.appspot.com/create'
headers = {'Content-Type': 'application/json'}
headers = { 'Content-Type': 'application/json',
'user-agent': GAM_INFO }
try:
resp, content = simplehttp.request(url_shortnr, 'POST', '{"long_url": "%s"}' % long_url, headers=headers)
except: