ember.js - Connect to a RESTful service which ends all URLs with an "/" -


i have connect restful service ends every url "/".

the list of products at

http://company.com/api/products/ 

and product id 1 at

http://company.com/api/products/1/ 

this current app/adapters/products.js

import ds 'ember-data';  export default ds.restadapter.extend({   host: 'http://company.com',   namespace: 'api' }); 

is there way configure ends "/" @ end?

overriding buildurl method ds.restadapter , appending slash should trick:

app.applicationadapter= ds.restadapter.extend({   buildurl: function() {     var url = this._super.apply(this, arguments);     return url + '/';   } }); 

Comments

Popular posts from this blog

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -