ProtocolResponse Object
error
Integer (optional) - When assigned, therequest
will fail with theerror
number . Die verfügbaren Fehlernummern, die Sie verwenden können, entnehmen Sie bitte der net error list.statusCode
number (optional) - Der Standard HTTP-Antwortcode ist 200.charset
string (optional) - The charset of response body, default is"utf-8"
.mimeType
string (optional) - The MIME type of response body, default is"text/html"
. SettingmimeType
would implicitly set thecontent-type
header in response, but ifcontent-type
is already set inheaders
, themimeType
would be ignored.headers
Record<string, string | string[]> (optional) - An object containing the response headers. The keys must be string, and values must be either string or Array of string.data
(Buffer | string | ReadableStream) (optional) - The response body. When returning stream as response, this is a Node.js readable stream representing the response body. When returningBuffer
as response, this is aBuffer
. When returningstring
as response, this is astring
. Dies wird für anderen Arten von Antworten ignoriert.path
string (optional) - Path to the file which would be sent as response body. Dies wird nur für Dateiantworten verwendet.url
string (optional) - Download theurl
and pipe the result as response body. Dies wird nur für URL-Antworten verwendet.referrer
string (optional) - Thereferrer
URL. Dies wird nur für Datei- und URL-Antworten verwendet.method
string (optional) - The HTTPmethod
. Dies wird nur für Datei- und URL-Antworten verwendet.session
Session (optional) - The session used for requesting URL, by default the HTTP request will reuse the current session. Settingsession
tonull
would use a random independent session. Dies wird nur für URL-Antworten verwendet.uploadData
ProtocolResponseUploadData (optional) - The data used as upload data. This is only used for URL responses whenmethod
is"POST"
.