python - Set user-agent for http requests for libraries which do not expose this setting? -


i trying oauth authentication using django-social-auth uses oauth2 under hood. adding custom backend vimeo. vimneo api requires api calls use custom user-agent.

oauth2 using httplib2 , doesn't have hook point set user agent. there way can "all network requests here on should use custom header".

if got question right, can send user-agent alongwith request headers.

h = httplib2.http(".cache") resp, content = h.request("https://example.org/chap/2",      "put", body="this text",      headers={'user-agent':'my user agent'} ) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -