wireui / wireui

TallStack UI components
https://v1.wireui.dev
MIT License
1.37k stars 166 forks source link

Select async search add headers #568

Closed fisher926 closed 11 months ago

fisher926 commented 1 year ago

Hello! How can I add headers to async data?

Ex. Authorization: Bearer

:async-data="[ 'api' => route('api.users.index'), 'method' => 'POST', // default is GET 'params' => ['ble' => 'baz'], // default is [] 'credentials' => 'include' // default is undefined, 'headers' => [ 'Authorization: Bearer '
] ? ]"

PH7-Jack commented 1 year ago

@fisher926 If you need to fetch an endpoint in your current laravel application, just allow this middleware https://github.com/wireui/docs/blob/main/app/Http/Kernel.php#L44 The WireUI will inject the authentication by default to the request

BMasquio commented 2 months ago

@fisher926 If you need to fetch an endpoint in your current laravel application, just allow this middleware https://github.com/wireui/docs/blob/main/app/Http/Kernel.php#L44 The WireUI will inject the authentication by default to the request

What middleware? The url is broken.