new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Nuxt · API · all subjects

composables/use-response-header

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

useResponseHeader composable signature

useResponseHeader is a composable that sets a server response header. It takes one parameter: the header name as a string. It returns an object with a value property that can be assigned to set the header value. The composable is available in Nuxt v3.14 and later.

useResponseHeader basic usage

Call useResponseHeader with the header name string to get a header object. Assign the desired value to the header.value property. For example: const header = useResponseHeader('X-My-Header'); header.value = 'my-value';

useResponseHeader in pages

useResponseHeader can be used within page components to set response headers on a per-page basis.

useResponseHeader in middleware

useResponseHeader can be used in Nuxt route middleware to set response headers that apply to multiple pages or all pages.

useResponseHeader in plugins

useResponseHeader can be used within Nuxt plugins to set server response headers.

useResponseHeader server-side only

useResponseHeader sets headers on the server response and should be used in server-side contexts such as pages, components, and plugins.

Give your agent this brain