down.js 471 Bytes
var request = require('request');
var _ = require('lodash');
var fs = require('fs');
var ipaddr = require('ipaddr.js');
var domain = require('../../config/common.js').domain;
// var domain = 'http://172.16.6.227:8083/yohobuy-platform-web';

exports.downFile = function(req, res) {
	var options = {
		method: 'POST',
		url: domain + '/batch/export',
		headers: {
			'content-type': 'application/json'
		},
		body: req.query,
		json: true
	};
	request(options).pipe(res);
}