Open JuoCode opened 9 years ago
I see it, use url.resolve
so the /api
is processed out, can you add a new configuration item prefix
?
In case others run into this: It seems that a trailing slash on the baseURL
and no preceding slash on your path argument will play nicely with url.resolve
. This worked for me:
API = restler.service(function() {}, {
baseURL: '/api/v1/'
}, {
createWidget: function(widget) {
return this.post('widgets', { widget: widget });
}
});
My api url like this
But i set
baseURL: http://domain.com/api/xxxxx
not work :(It seem to be the
/api
prefix is ignored,can support this ?