use new match option instead of header

so that it works in IE9 too.
This commit is contained in:
Matthew Taylor 2016-08-12 14:40:26 -04:00
parent d6d5fa0f8a
commit ccfde96f67

View file

@ -3,16 +3,13 @@ var api = require('./api');
module.exports = function smartyStreetApi (params, callback) {
defaults(params, {
'auth-id': process.env.SMARTY_STREETS_API_KEY
'auth-id': process.env.SMARTY_STREETS_API_KEY,
'match': 'range'
});
api({
host: 'https://api.smartystreets.com',
uri: '/street-address',
headers: {
'X-Standardize-Only': true
},
params: params,
useXDR: false
params: params
}, function (err, body, res) {
if (err) return callback(err);
if (res.statusCode !== 200) {