mardi 23 février 2016

Ember Data: Prevent encodeURIComponent on Query Params

I am working with an API which requires the use of reserved words, against the recommendation of the specification. I need to override the default behaviour of encoding the URL.

Here are my query params:

export default Ember.Mixin.create({
    keywords: null,
    genre: Ember.computed.alias("applicationController.genre"),
    qualities: ["720p", "1080p", "3d"],
    quality: "720p,1080p,3d",
    queryParams: ["keywords", "page", "perPage", "genre", "sort", "quality"],
    perPage: 50,
    page: 1,
    sort: "asc"
});

Currently, the request goes out with , characters replaced with %2c. How can I keep my query param value for quality?




Aucun commentaire:

Enregistrer un commentaire