Skip to content

Tankōbon / main/services/http-json / getImage

Function: getImage() ​

getImage(url, options, source, maxBytes): Promise<Buffer<ArrayBufferLike>>

Defined in: main/services/http-json.ts:144

GETs an image and returns its bytes. Throws "<source>: …" (translated) like getHtml, and when the body is above maxBytes.

Parameters ​

url ​

string

options ​

HttpOptions

source ​

string

maxBytes ​

number

Returns ​

Promise<Buffer<ArrayBufferLike>>