sendgrid / python-http-client

Twilio SendGrid's Python HTTP Client for calling APIs
https://sendgrid.com
MIT License
126 stars 101 forks source link

How to set the timeout parameter #20

Closed PatrickHanAvaya closed 6 years ago

PatrickHanAvaya commented 7 years ago

Issue Summary

Maybe I missed something, But I have no idea how to set timeout of a http request using this library

thinkingserious commented 7 years ago

Hello @PatrickHanAvaya,

It looks like we need to expose that functionality here with this solution.

For this issue to gain priority in our backlog, we need additional +1's or a PR. When we receive a PR, that provides the biggest jump in priority.

Thanks!

With Best Regards,

Elmer

prabhakar267 commented 7 years ago

@thinkingserious I would like to take this up

wynnw commented 6 years ago

Hey - a +1 for this and it's associated PR. We've run into situations where this missing functionality caused us problems when trying to use the sendgrid-python library. The timeout option really needs to be available as the there's no good workaround. Right now I'm monkey patching the _make_request method which is never the happiest solution.

thinkingserious commented 6 years ago

Thanks for the vote @wynnw, it helps move that PR up our queue!

If you have a moment, a code review would be most appreciated and can also help this item move up the queue: https://github.com/sendgrid/python-http-client/pull/42

thinkingserious commented 6 years ago

This will be included in release v3.1.0 by tomorrow.

The Client object now accepts a timeout parameter.

Thanks!