rejectUnauthorized—Specifies whether to check the SSL certificate of the remote server against the list of certificate authorities. For example, set this to false when you need to communicate with a web service encrypted with a self-signed certificate. Default value: true.

callback arguments:

The error object has the following fields:

message—A message describing the error.

code—The error code of the response.

name—The name of the error.

The result object has the following fields:

statusCode—The HTTP status code of the response.

body—The body of the response as a string.

data—The body of the response as a JavaScript object. This field is set only if the Content-Type is recognized and supported.

headers—The headers of the response as a JavaScript object. Example: response.headers['Content-Type'].