-
Notifications
You must be signed in to change notification settings - Fork 767
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
possibility to set custom curl options #164
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
Hi @gitazem Thanks so much for your pull request. Best, |
Hello, I am downloading many reports each day, and sometimes wsdl called via curl takes too long to respond. When i will set a smaller timeout, i can retry request faster. So all my download runs faster. Thank you ! Best,
|
Hello Gita, But AdWords API reporting isn't involved with WSDL and SOAP calls, I believe. Best, |
Hello, yes, sorry, you are right. Its needed for normal HTTP requests. Best,
|
@fiboknacky Can we also have this in experimental branch? |
Hi @hakimio, In the experimental branch, we use Guzzle for downloading reports. Best, |
@fiboknacky |
Hi @hakimio, I think the support for setting custom cURL options is already supported via construction of More specifically, you can create a Guzzle Then, you specify this object as a parameter of ReportDownloader. So, probably we don't need to modify our code in the experimental branch. Cheers, |
I can see that you are setting "handler" Guzzle Client config in ReportDownloader constructor when instantiating the client. Wouldn't it make more sense to accept guzzle client config (array) instead of client instance as the constructor parameter and then merge custom config with the default options? |
Hi @hakimio, That is another possible way to do. Curl options are another kind of configs that can be treated in the same way--passing as parameter to Best, |
I see. Thanks for explanation. |
sometimes need to set some useful curl options. example:
$customCurlOptions = ['CURLOPT_TIMEOUT' => 1];