Changelog
2.2.0
Changelog
2.1.0
buildQuery
option to define custom query string behaviorChangelog
2.0.0
then
, catch
, and done
methods. then
and catch
return true
promises. The intention is to allow for access to the underlying
superagent request while still exposing promise functionality.Promise
option to provide the Promise implementation to
use for Gangway.route
now operates one step shallower. See README for usage.If you are upgrading from 1.0, there are a couple of necessary changes:
If a global Promise object is not found, Gangway will throw an error. To eliminate this error, provide a Promise library to Gangway:
var Promise = require('promise')
Gangway({
Promise: Promise
})
The two-level approach to declaring routes has been removed. The following patterns should be switched out:
// OLD
API.route({
users: {
get: {
path: '/users'
}
}
})
// NEW (correct)
API.namespace('users').route{
get: {
path:'/users'
}
}}
Routes without a /
at the beginning will resolve to their
namespace. Check to ensure that your paths are resolving correctly for
your endpoints if you use absolute paths.