vendredi 9 septembre 2016

Ember: How to make POST request using href

I have href that contains GET request. It is doing export of some data to csv file and it works well. By clicking on the link particular service returns csv file that appears in downloads.

hbs:

<a ><span class="fooicon-excel"></span></a>

js:

app.FooController = Ember.ObjectController.extend({
  csvExportUri: function () {
        var opts = this.model.options;
        return '/bar/csv?' + $.param(options);
  }.property('model')

My question is how to modify code so href will represent POST request? I need it because my param became too big.

Thank you




Aucun commentaire:

Enregistrer un commentaire