We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dd46e4 commit 77bdd5dCopy full SHA for 77bdd5d
src/Requests/MailchimpConnection.php
@@ -179,10 +179,13 @@ private function setHandlerOptionsForMethod()
179
180
/**
181
* Executes a connection with the current request and settings
182
+ *
183
+ * @param bool $close close this connection after execution
184
185
* @return MailchimpResponse
186
* @throws MailchimpException
187
*/
- public function execute()
188
+ public function execute($close = true)
189
{
190
$this->response = $this->executeCurl();
191
if (!$this->response) {
@@ -197,6 +200,10 @@ public function execute()
197
200
strlen($this->response)
198
201
);
199
202
203
+ if ($close) {
204
+ $this->close();
205
+ }
206
+
207
if ($this->isSuccess()) {
208
return new SuccessResponse(
209
$this->headers,
0 commit comments