Skip to content

Commit 0e0a095

Browse files
committed
Adjust HTTP client setup
1 parent 806eeec commit 0e0a095

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Twilio/Http/LaravelHttpClient.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ public function request(
2828
int $timeout = null,
2929
?AuthStrategy $authStrategy = null,
3030
): Response {
31-
$request = $this->httpFactory->asForm();
31+
$request = $this->httpFactory->bodyFormat('form_params')
32+
->withHeaders($headers);
3233

3334
if ($user && $password) {
3435
$request->withBasicAuth($user, $password);
3536
} elseif ($authStrategy instanceof AuthStrategy) {
3637
$request->withHeader('Authorization', $authStrategy->getAuthString());
3738
}
3839

39-
$request->withHeaders($headers);
40-
4140
$requestOptions = [
4241
'form_params' => $data,
4342
'query' => $params,

0 commit comments

Comments
 (0)