我正在尝试使用gethttps模块中的方法向API发出请求.
看看NodeJS中的HTTPS请求,我有很长的路要走,但我的请求似乎没有包含查询参数......
使用上面的例子,我的mods:
var $q = require('q'),
_ = require('lodash'),
path = require('path'),
Qs = require('qs'),
path = require('path'),
uuid = require('node-uuid'),
https = require('https');
var params = {
schema: '1.0',
form: 'json',
username: 'name'
}
var options = {
host: 'openshift.redhat.com',
port: 443,
path: '/broker/rest/api',
query: params
};
var req = https.get(options, function(res) {
Run Code Online (Sandbox Code Playgroud)