返回列表

http 用户名 密码

默认分类 2013/11/05 21:00

http://用户名:密码@api.jiepang.com/locations/photos?apiver=20130422&guid=EB9D40331AA77D&count=999&page=1

var options = {
    headers: {
        'content-type': 'application/x-www-form-urlencoded'
    },
    url: opt_uri,
    body: body
};

if (auth.jp_u && auth.jp_p) {
    options.headers['Authorization'] = 'Basic ' +  (new Buffer(auth.jp_u + ':' + auth.jp_p).toString('base64'));
}
//console.dir(options);

request.post(options, this);