lib/iod.js
function(results) {
			// Only do so if `callback` is specified
			if (IODOpts.callback) {
				var options = { url: IODOpts.callback.uri }
				var res = JSON.stringify(results)

				// Url-encode use `form` property
				if (IODOpts.callback.method === 'encoded') {
					options.form = { results: res }
				}

				var r = request.post(options, function(err, res) {
					// Emits `CbError` if any error occurs while sending results to callback
					if (err) IOD.eventEmitter.emit('CbError', err)
					else if (res.statusCode !== 200) {
						IOD.eventEmitter.emit('CbError', 'Status Code: ' + res.statusCode)
					}
				})

				// Multipart use form object
				if (IODOpts.callback.method === 'multipart') {
					var form = r.form()
					form.append('results', res)

					form.on('error', function(err) {
						IOD.evenEmitter.emit('CBError', err)
					})
				}
			}
		}
function(results) {
			// Only do so if `callback` is specified
			if (IODOpts.callback) {
				var options = { url: IODOpts.callback.uri }
				var res = JSON.stringify(results)

				// Url-encode use `form` property
				if (IODOpts.callback.method === 'encoded') {
					options.form = { results: res }
				}

				var r = request.post(options, function(err, res) {
					// Emits `CbError` if any error occurs while sending results to callback
					if (err) IOD.eventEmitter.emit('CbError', err)
					else if (res.statusCode !== 200) {
						IOD.eventEmitter.emit('CbError', 'Status Code: ' + res.statusCode)
					}
				})

				// Multipart use form object
				if (IODOpts.callback.method === 'multipart') {
					var form = r.form()
					form.append('results', res)

					form.on('error', function(err) {
						IOD.evenEmitter.emit('CBError', err)
					})
				}
			}
		}
function ( results ) { // Only do so if `callback` is specified if ( IODOpts . callback ) { var options = { url : IODOpts . callback . uri } var res = JSON . stringify ( results ) // Url-encode use `form` property if ( IODOpts . callback . method === 'encoded' ) { options . form = { results : res } } var r = request . post ( options , function ( err , res ) { // Emits `CbError` if any error occurs while sending results to callback if ( err ) IOD . eventEmitter . emit ( 'CbError' , err ) else if ( res . statusCode !== 200 ) { IOD . eventEmitter . emit ( 'CbError' , 'Status Code: ' + res . statusCode ) } } ) // Multipart use form object if ( IODOpts . callback . method === 'multipart' ) { var form = r . form ( ) form . append ( 'results' , res ) form . on ( 'error' , function ( err ) { IOD . evenEmitter . emit ( 'CBError' , err ) } ) } } }
Sends results of request to specified callback.

@param {*} results - Results of request
Sends results of request to specified callback .