guzzlehttp throwing error on laravel project - strtolower(): Argument #1 ($string) must be of type string, int given
I am trying to consume one POST api using guzzlehttp In my laravel project. But i am getting one error on my dev server. This working perfectly on my local system. $postArray is manipulating correctly both side. This is my composer version. "guzzlehttp/guzzle": "^7.3", If any one know about this please help me out.
$response = Http::withHeaders([
"accept: application/json",
"content-type: application/json"
])->post('https://staging.consume.com/testing', $postArray)->json();
strtolower(): Argument #1 ($string) must be of type string, int given
{
"message": "strtolower(): Argument #1 ($string) must be of type string, int given",
"exception": "TypeError",
"file": "/mnt/drive_1/www/deploy-api-2021-07-29-14-25-12/vendor/guzzlehttp/psr7/src/Utils.php",
"line": 28,
"trace": [
{
"file": "/mnt/drive_1/www/deploy-api-2021-07-29-14-25-12/vendor/guzzlehttp/psr7/src/Utils.php",
"line": 28,
"function": "strtolower"
},
{
"file": "/mnt/drive_1/www/deploy-api-2021-07-29-14-25-12/vendor/guzzlehttp/psr7/src/Utils.php",
"line": 189,
"function": "caselessRemove",
"class": "GuzzleHttp\\Psr7\\Utils",
"type": "::"
},
{
"file": "/mnt/drive_1/www/deploy-api-2021-07-29-14-25-12/vendor/guzzlehttp/guzzle/src/Client.php",
"line": 455,
"function": "modifyRequest",
"class": "GuzzleHttp\\Psr7\\Utils",
"type": "::"
},
source https://stackoverflow.com/questions/68581387/guzzlehttp-throwing-error-on-laravel-project-strtolower-argument-1-strin
Comments
Post a Comment