Home > @uniformdev/mesh-sdk-react > useRequestHeader

useRequestHeader() function

Hook to make it simple to read and write a specific request header by name, instead of supporting multiple values in an array like native dispatch.

NOTE: if multiple values are added for the named header, this hook will bind to the FIRST instance of the header and leave the other values alone.

Signature:

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

headerName

</td><td>

string

</td><td>

</td></tr> </tbody></table> Returns:

{ value: string; update: (value: string) => void; }