Comments (3)
This has now been fixed in v2.1 of the cache plugin 🔥 Thank you for raising this! https://github.com/Sammyjo20/saloon-cache-plugin/releases/tag/v2.1.0
from saloon.
Hey @boryn
Ah I have found a way we can get around this - I will just implement a fix for you.
from saloon.
Hi @Sammyjo20 !
Looking at the original CacheKeyHelper
:
public static function create(PendingRequest $pendingRequest): string
{
$className = $pendingRequest->getRequest()::class;
$requestUrl = $pendingRequest->getUrl();
$query = $pendingRequest->query()->all();
$headers = $pendingRequest->headers()->all();
return json_encode(compact('className', 'requestUrl', 'query', 'headers'), JSON_THROW_ON_ERROR);
}
I started to think if it may happen that $pendingRequest->query()
or $pendingRequest->headers()
is null? It's possible with $pendingRequest->body()
that this is null.
In that case not to raise an error of running ->all()
on null
we'd rather need:
$query = optional($pendingRequest->query())->all();
$headers = optional($pendingRequest->headers())->all();
from saloon.
Related Issues (20)
- Allow sending duplicated keys in multipart body HOT 5
- Custom paginator using callbacks instead of forcing JSON response HOT 2
- Extra Mocking Documentation HOT 19
- How to stream upload files via MultipartValue? HOT 2
- Generate from OpenAPI Spec HOT 3
- Paginator empty after ->count() HOT 6
- Artisan command does not work HOT 3
- Request URL overwrite not working HOT 3
- cacheable OAuth Request HOT 8
- Feature Request: Cookies Implimentation HOT 4
- GuzzleSender::createResponse(): Argument #2 ($guzzleResponse) must be of type Psr\Http\Message\ResponseInterface, null given HOT 1
- documentation offline ? HOT 2
- A facade root has not been set HOT 4
- Upgrade from v1 composer confusion... HOT 1
- Plugin - DisablesSSLVerification HOT 1
- Trying to connect to O365 HOT 1
- AuthConnector::createOAuthAuthenticator(): Argument #2 ($refreshToken) must be of type string, null given HOT 1
- Feature request: Exponential backoff HOT 2
- [3.x] Feedback: Concurrency & Pools slower than in v2 HOT 16
- [3.x] specify default page overwrited by `rewind` method HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from saloon.