@@ -301,22 +301,6 @@ public function configureCurl($curl)
301
301
curl_setopt ($ curl , CURLOPT_HTTPGET , false );
302
302
curl_setopt ($ curl , CURLOPT_CUSTOMREQUEST , $ this ->getMethod ());
303
303
}
304
- // Request body
305
- switch ($ this ->getMethod ()) {
306
- case self ::REQUEST_METHOD_GET :
307
- case self ::REQUEST_METHOD_HEAD :
308
- // Modify the URL using the body as query string
309
- break ;
310
- case self ::REQUEST_METHOD_POST :
311
- // curl_setopt($curl, CURLOPT_POSTFIELDS, $requestBody);
312
- break ;
313
- case self ::REQUEST_METHOD_PUT :
314
- // curl_setopt($curl, CURLOPT_POSTFIELDS, $requestBody);
315
- break ;
316
- case self ::REQUEST_METHOD_PATCH :
317
- // curl_setopt($curl, CURLOPT_POSTFIELDS, $requestBody);
318
- break ;
319
- }
320
304
return $ this ;
321
305
}
322
306
@@ -337,6 +321,9 @@ public function perform()
337
321
$ this ->configureCurl ($ curl );
338
322
$ this ->getTransport ()->configureCurl ($ curl );
339
323
$ this ->getMessage ()->configureCurl ($ curl );
324
+ for ($ i = 0 ; $ i < count ($ this ->authentications ); $ i ++) {
325
+ $ this ->authentications [$ i ]->configureCurl ($ curl );
326
+ }
340
327
// Execute request
341
328
$ responseBody = curl_exec ($ curl );
342
329
$ curlErrorCode = curl_errno ($ curl );
0 commit comments