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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -