ProtocolResponse Object 
- errorInteger (optional) - When assigned, the- requestwill fail with the- errornumber . For the available error numbers you can use, please see the net error list.
- statusCodenumber (optional) - The HTTP response code, default is 200.
- charsetstring (optional) - The charset of response body, default is- "utf-8".
- mimeTypestring (optional) - The MIME type of response body, default is- "text/html". Setting- mimeTypewould implicitly set the- content-typeheader in response, but if- content-typeis already set in- headers, the- mimeTypewould be ignored.
- headersRecord<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 returning- Bufferas response, this is a- Buffer. When returning- stringas response, this is a- string. This is ignored for other types of responses.
- pathstring (optional) - Path to the file which would be sent as response body. This is only used for file responses.
- urlstring (optional) - Download the- urland pipe the result as response body. This is only used for URL responses.
- referrerstring (optional) - The- referrerURL. This is only used for file and URL responses.
- methodstring (optional) - The HTTP- method. This is only used for file and URL responses.
- sessionSession (optional) - The session used for requesting URL, by default the HTTP request will reuse the current session. Setting- sessionto- nullwould use a random independent session. This is only used for URL responses.
- uploadDataProtocolResponseUploadData (optional) - The data used as upload data. This is only used for URL responses when- methodis- "POST".