Commit ccfde96f authored by Matthew Taylor's avatar Matthew Taylor

use new `match` option instead of header

so that it works in IE9 too.
parent d6d5fa0f
...@@ -3,16 +3,13 @@ var api = require('./api'); ...@@ -3,16 +3,13 @@ var api = require('./api');
module.exports = function smartyStreetApi (params, callback) { module.exports = function smartyStreetApi (params, callback) {
defaults(params, { defaults(params, {
'auth-id': process.env.SMARTY_STREETS_API_KEY 'auth-id': process.env.SMARTY_STREETS_API_KEY,
'match': 'range'
}); });
api({ api({
host: 'https://api.smartystreets.com', host: 'https://api.smartystreets.com',
uri: '/street-address', uri: '/street-address',
headers: { params: params
'X-Standardize-Only': true
},
params: params,
useXDR: false
}, function (err, body, res) { }, function (err, body, res) {
if (err) return callback(err); if (err) return callback(err);
if (res.statusCode !== 200) { if (res.statusCode !== 200) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment