lib/send.js
function makeOptions(IOD, IODOpts, apiType, reqOpts) {
	var path = IodU.makePath(IOD, IODOpts, apiType)
	var method = apiType === IOD.TYPES.JOB || !_.isEmpty(IODOpts.files) ?
		'post' : IODOpts.method.toLowerCase()

	return _.defaults({
		url: IOD.host + ':' + IOD.port + path,
		path: path,
		method: method,

		// For 'get' request use request `qs` property.
		qs: method === 'get' ?
			_.defaults({ apiKey: IOD.apiKey }, exports.prepareParams(IODOpts.params)) : undefined,

		// For 'post' request with no files use `form` property
		form: method === 'post' && !IODOpts.files ?
			_.defaults({ apiKey: IOD.apiKey }, exports.prepareParams(IODOpts.params)) : undefined
	}, reqOpts, IOD.reqOpts)
}
function makeOptions(IOD, IODOpts, apiType, reqOpts) {
	var path = IodU.makePath(IOD, IODOpts, apiType)
	var method = apiType === IOD.TYPES.JOB || !_.isEmpty(IODOpts.files) ?
		'post' : IODOpts.method.toLowerCase()

	return _.defaults({
		url: IOD.host + ':' + IOD.port + path,
		path: path,
		method: method,

		// For 'get' request use request `qs` property.
		qs: method === 'get' ?
			_.defaults({ apiKey: IOD.apiKey }, exports.prepareParams(IODOpts.params)) : undefined,

		// For 'post' request with no files use `form` property
		form: method === 'post' && !IODOpts.files ?
			_.defaults({ apiKey: IOD.apiKey }, exports.prepareParams(IODOpts.params)) : undefined
	}, reqOpts, IOD.reqOpts)
}
function makeOptions ( IOD , IODOpts , apiType , reqOpts ) { var path = IodU . makePath ( IOD , IODOpts , apiType ) var method = apiType === IOD . TYPES . JOB || ! _ . isEmpty ( IODOpts . files ) ? 'post' : IODOpts . method . toLowerCase ( ) return _ . defaults ( { url : IOD . host + ':' + IOD . port + path , path : path , method : method , // For 'get' request use request `qs` property. qs : method === 'get' ? _ . defaults ( { apiKey : IOD . apiKey } , exports . prepareParams ( IODOpts . params ) ) : undefined , // For 'post' request with no files use `form` property form : method === 'post' && ! IODOpts . files ? _ . defaults ( { apiKey : IOD . apiKey } , exports . prepareParams ( IODOpts . params ) ) : undefined } , reqOpts , IOD . reqOpts ) }
Creates a request options object with.

@param {IOD} IOD - IOD object
@param {Object} IODOpts - IOD options
@param {String} apiType - IOD request type
@param {Object} reqOpts - Request options for current request
@returns {Object} Request options object
Creates a request options object with .