Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose internal request object #111

Closed
wants to merge 2 commits into from
Closed

Conversation

omriiluz
Copy link

@omriiluz omriiluz commented Dec 6, 2013

this pull request fixes #106 in a naive implementation.

Keep track of the last http request submitted by the transporter. can be
used to access socket information, e.g. to achieve progress tracking on
uploads.
@rakyll
Copy link
Contributor

rakyll commented Dec 9, 2013

Thanks for the PR.

Returning back to #106, I'd like to return request object instead. But, the idea of transporters came into the scene why we wanted to decouple http requests from requests module. It's not just the transporter doesn't provide any useful interfaces to learn more about what's going on, also it shouldn't be transporter's role to provide info. I should probably introduce an HttpRequest type and push it up to the requests.Request level. I question the necessity of our abstractions at transporter level and below now, because in practice, it's nonsense to avoid exposing of requests.Request.

Leaving this PR open for now.

@omriiluz
Copy link
Author

Thanks rakyll. Any guidance/alternatives for a short term solution that would allow me to reach into the request object? My google drive synchronization app need to be able to provide progress report (especially on big files) and I was hoping this pull request is harmless enough that we could use it until a better solution emerges.

@ryanseys
Copy link
Contributor

Fixed in 1.0.0. You can now specify request options as a default without worrying explicitly about the request object.

More information on passing additional options here: https://github.com/google/google-api-nodejs-client#options

Let me know how this works out for you.

@ryanseys ryanseys closed this Jul 22, 2014
This was referenced Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expose internal request object
3 participants