Skip to content

Commit 79c2dd6

Browse files
author
Andrey Helldar
authored
Merge pull request #83 from cashier-provider/3.x
Added `lmc/http-constants`
2 parents 88df890 + 91522ce commit 79c2dd6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0",
3636
"illuminate/queue": "^6.0 || ^7.0 || ^8.0 || ^9.0",
3737
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0",
38+
"lmc/http-constants": "^1.2",
3839
"psr/http-message": "^1.0",
3940
"ramsey/uuid": "^3.7 || ^4.0",
4041
"symfony/http-kernel": "^4.0 || ^5.0 || ^6.0"

src/Helpers/Http.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use DragonCode\Support\Facades\Helpers\Str;
3232
use GuzzleHttp\Client;
3333
use GuzzleHttp\Exception\ClientException as GuzzleClientException;
34+
use Lmc\HttpConstants\Header;
3435
use Psr\Http\Message\ResponseInterface;
3536
use Throwable;
3637

@@ -149,7 +150,7 @@ protected function body(array $data, array $headers): array
149150
{
150151
$headers = $this->lowerKeys($headers);
151152

152-
if (Arr::get($headers, 'content-type') === 'application/x-www-form-urlencoded') {
153+
if (Arr::get($headers, Header::CONTENT_TYPE) === 'application/x-www-form-urlencoded') {
153154
return ['form_params' => $data];
154155
}
155156

0 commit comments

Comments
 (0)