Skip to content

ElectronClientRequest.setHeader method

ElectronClientRequest › setHeader

Unofficial

Adds an extra HTTP header. The header name will be issued as-is without lowercasing. It can be called only before first write. Calling this method after the first write will throw an error. If the passed value is not a string, its toString() method will be called to obtain the final value.

Signature:

setHeader(name: string, value: string): void

Parameters:

Parameter Type Description
name string The header name.
value string The header value.

Returns: void