down.js 407 Bytes
var request = require('request');
var _ = require('lodash');
var fs = require('fs');
var ipaddr = require('ipaddr.js');
var domain = require('../../config/common.js').domain;

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);	
}