Skip to content

ElectronClientRequest.write method

ElectronClientRequest › write

Unofficial

Adds a chunk of data to the request body. The first write operation may cause the request headers to be issued on the wire. After the first write operation, it is not allowed to add or remove a custom header.

Signature:

write(chunk: any, encoding?: string | undefined, callback?: (() => void) | undefined): void

Parameters:

Parameter Type Description
chunk any A chunk of request body data.
encoding? string | undefined The encoding of chunk.
callback? (() => void) | undefined Invoked after the chunk content has been delivered to the Chromium networking layer.

Returns: void