You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem during passing array to withCookies() function of HTTP client facade - Laravel throw an exception:
InvalidArgumentException {#365 #message: "cookies must be an instance of GuzzleHttp\Cookie\CookieJarInterface" #code: 0 #file: "D:\Laravel\api\vendor\guzzlehttp\guzzle\src\Middleware.php" #line: 31 trace: { ... }
After changing parameter type from array to CookieJarInterface in PendingRequest class:
public function withCookies(CookieJarInterface $cookies)
and the CookieJar object is passed, the problem does not occur and everything works fine. Do you know it is Laravel problem or maybe I do something wrong?
The text was updated successfully, but these errors were encountered:
Hi,
I have a problem during passing array to withCookies() function of HTTP client facade - Laravel throw an exception:
InvalidArgumentException {#365 #message: "cookies must be an instance of GuzzleHttp\Cookie\CookieJarInterface" #code: 0 #file: "D:\Laravel\api\vendor\guzzlehttp\guzzle\src\Middleware.php" #line: 31 trace: { ... }
After changing parameter type from array to CookieJarInterface in PendingRequest class:
public function withCookies(CookieJarInterface $cookies)
and the CookieJar object is passed, the problem does not occur and everything works fine. Do you know it is Laravel problem or maybe I do something wrong?
The text was updated successfully, but these errors were encountered: