node-rest-client
は実際にドキュメントごとにHTTPS要求をサポートしています。 443ポートまたはクライアントを初期化するときconnection
オプションを追加します:あなたは指定する必要があり
var options = {
// proxy configuration
proxy: {
host: "proxy.foo.com", // proxy host
port: 8080, // proxy port
user: "ellen", // proxy username if required
password: "ripley" // proxy pass if required
},
// aditional connection options passed to node http.request y https.request methods
// (ie: options to connect to IIS with SSL)
connection: {
secureOptions: constants.SSL_OP_NO_TLSv1_2,
ciphers: 'ECDHE-RSA-AES256-SHA:AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM',
honorCipherOrder: true
},
// customize mime types for json or xml connections
mimetypes: {
json: ["application/json", "application/json;charset=utf-8"],
xml: ["application/xml", "application/xml;charset=utf-8"]
},
user: "admin", // basic http auth username if required
password: "123", // basic http auth password if required
requestConfig: {
timeout: 1000, //request timeout in milliseconds
noDelay: true, //Enable/disable the Nagle algorithm
keepAlive: true, //Enable/disable keep-alive functionalityidle socket.
keepAliveDelay: 1000 //and optionally set the initial delay before the first keepalive probe is sent
},
responseConfig: {
timeout: 1000 //response timeout
}
};
詳細はhttps://github.com/aacerox/node-rest-clientを参照してください。
「リクエスト」はまた、この種のもののための優れたモジュールでもあり、httpsもサポートしています – Paul