I have to connect to a RESTful service that ends every URL with an "/".
The list of products is at
http://company.com/api/products/
And the product with the ID 1 is at
http://company.com/api/products/1/
This is my current app/adapters/products.js
import DS from 'ember-data';
export default DS.RESTAdapter.extend({
host: 'http://company.com',
namespace: 'api'
});
Is there a way to configure it so that it always ends a "/" at the end?
Overriding the
buildURLmethod fromDS.RESTAdapterand appending a slash should do the trick: