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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -