-
Notifications
You must be signed in to change notification settings - Fork 48
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
request timeout #41
Comments
You can extend the endpoint class and overwrite the method with yours, then in your overwrite, add the timeout properly: <?php
class MyMailWizzApi_Endpoint_ListSegments extends MailWizzApi_Endpoint_ListSegments
{
/**
* Get segments from a certain mail list
*
* Note, the results returned by this endpoint can be cached.
*
* @param string $listUid
* @param integer $page
* @param integer $perPage
*
* @return MailWizzApi_Http_Response
* @throws ReflectionException
*/
public function getSegments($listUid, $page = 1, $perPage = 10)
{
$client = new MailWizzApi_Http_Client(array(
'timeout' => 60,
'method' => MailWizzApi_Http_Client::METHOD_GET,
'url' => $this->getConfig()->getApiUrl(sprintf('lists/%s/segments', $listUid)),
'paramsGet' => array(
'page' => (int)$page,
'per_page' => (int)$perPage
),
'enableCache' => true,
));
return $response = $client->request();
}
} <?php
$endpoint = new MyMailWizzApi_Endpoint_ListSegments();
$endpoint->getSegments(); |
yeah but for single parameter I have to extend every classes for the
endpoint
…On Mon, Nov 15, 2021 at 9:12 PM Cristian ***@***.***> wrote:
Closed #41 <#41>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC4I3HPES5XTOBTYP5Z7PN3UMES6LANCNFSM5IBW5SZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In getting segments, the request is getting timeout error. How we can increase the timeout parameter of request?
In code its set to 30 seconds. Without hard coding how can I set it?
The text was updated successfully, but these errors were encountered: