Comments (2)
Thanks for your response!
Well, it works! :-). Think i'm going to fork anytime soon and just submit a PR for this.
It looks great to me.
Thanks!
from laravel-unleash.
Hi!
This isn't possible with the current version of the package, however if you can submit a PR for it I'd gladly take a look.
I image we could use the config to set these headers then pass them into to the Guzzle client.
If you need to do this urgently, then you can always use Laravel's service container binding to override the client in this package with your own client that contains the headers:
use MikeFrancis\LaravelUnleash\Client as UnleashGuzzleClient;
$this->app->singleton(UnleashGuzzleClient::class, function ($app) {
return new UnleashGuzzleClient([
'base_uri' => config('unleash.url'),
'headers' => [
'UNLEASH-APPNAME' => 'appName',
'UNLEASH-INSTANCEID' => 'instanceId',
],
]);
});
I haven't tested that code but it should give you an idea!
from laravel-unleash.
Related Issues (13)
- Support for laravel 5.5 HOT 1
- Update for laravel framework ^7 HOT 4
- Target [GuzzleHttp\ClientInterface] is not instantiable HOT 9
- Allow versions of Laravel 8 HOT 2
- UserWithId Strategy calls id() method on User Model HOT 6
- Feature flags during test execution HOT 4
- Cannot find JsonException (laravel 7) HOT 4
- Incompatible with Pest pestphp/pest (v1.20) HOT 6
- Laravel 9 support HOT 1
- Transfer ownership
- idea: reload cache when its about to expire in __destruct() HOT 1
- test
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 laravel-unleash.