question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Discussion] HTTP library

See original GitHub issue

Presently, we use httplib2 by default but allow users to specify their own http library (#908) so long as it conforms to httplib2.Http’s signature.

httplib2 was chosen because it’s the underlying http client used by google/oauth2client. However, httplib2 has a variety of issues include not being thread-safe (#1274), not doing any connection pooling, etc.

We should consider what it would take to move to another http library. The major considerations are:

  1. We must support using oauth2client’s credentials with the library. The essential functionality is adding the auth header and performing refresh & retry. This can be done either here or within oauth2client.
  2. The library must work on Google App Engine.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:62 (56 by maintainers)

github_iconTop GitHub Comments

10reactions
theacodescommented, Dec 2, 2016

Update:

This library now uses google-auth instead of oauth2client. google-auth supports httplib2, requests, and urllib3.

We still need a plan of attack for removing httplib2 as the transport here, but we no longer have a hard dependency on it.

3reactions
asilversempiricalcommented, Apr 19, 2017

What’s the current status of thread-safety in the python APIs? https://github.com/GoogleCloudPlatform/google-cloud-python/issues/1214 was closed and redirected to this issue, but it’d be nice to have a clearer explanation of what’s going on in this issue with respect to thread safety. FWIW https://developers.google.com/api-client-library/python/guide/thread_safety still mentions only httplib2 and a somewhat cumbersome workaround to ensure thread safety.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generic HTTP client/server library - Pitches - Swift Forums
The purpose of this thread is to discuss the viability of a shared generic HTTP client/server library to provide high quality ...
Read more >
Discussion Lists - PCC - Library of Congress
PCCLIST@LISTSERV.LOC.GOV is an unmoderated e-mail discussion list intended primarily for participants in the NACO program and for participants in the PCC ...
Read more >
HTTP client libraries - need better one in standard library?
HTTP client libraries - need better one in standard library? Chat / Discussions · hubertlepicki March ...
Read more >
Book Discussion Groups: History and General Resources
Many libraries administer one or more book discussion groups, create resources for book groups in their community, or provide meeting space ...
Read more >
Coming Together around Library 2.0 - D-Lib Magazine
... Library 2.0. A Focus for Discussion and a Call to Arms ... <http://www.talis.com> ... Library 2.0 is more, though, than just a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found