johannschopplich / nuxt-api-party

🐬 Securely connect to any API with a server proxy and generated composables
https://nuxt-api-party.byjohann.dev
MIT License
260 stars 10 forks source link

Dynamic Backend URL bug #79

Closed ye1999 closed 3 months ago

ye1999 commented 3 months ago

Environment

"nuxt-api-party": "^2.0.8",

Reproduction

const { data } = await useJsonPlaceholderData( 'comments', { headers: { 'Json-Placeholder-Endpoint-Url': 'https://jsonplaceholder-v2.typicode.com' } } )

Describe the bug

’Json-Placeholder-Endpoint-Url‘ × ‘jsonPlaceholder-endpoint-url’ √

Additional context

docs:https://nuxt-api-party.byjohann.dev/guide/dynamic-backend-url.html source code:handler.ts:50
const baseURL = new Headers(headers).get(${endpointId}-endpoint-url) || endpoint.url

Logs

No response

johannschopplich commented 3 months ago

Thanks for the report!