lib/addMethod/addMethodREST.js
function afterHeadersResolve (body, result) {

			logger.info(methodName+': running `afterHeaders` hook');
			globalize.afterHeaders.call(threadneedle, config, null, body, params, result.response)

			.done(
				function (headers) {
					resolve(formatResponse(headers, body));
				},
				function (error) {
					reject(formatResponse({}, error));
				}
			);

		}
function afterHeadersResolve (body, result) {

			logger.info(methodName+': running `afterHeaders` hook');
			globalize.afterHeaders.call(threadneedle, config, null, body, params, result.response)

			.done(
				function (headers) {
					resolve(formatResponse(headers, body));
				},
				function (error) {
					reject(formatResponse({}, error));
				}
			);

		}
function afterHeadersResolve ( body , result ) { logger . info ( methodName + ': running `afterHeaders` hook' ) ; globalize . afterHeaders . call ( threadneedle , config , null , body , params , result . response ) . done ( function ( headers ) { resolve ( formatResponse ( headers , body ) ) ; } , function ( error ) { reject ( formatResponse ( { } , error ) ) ; } ) ; }
Handle afterHeader for resolving
Handle afterHeader for resolving