Skip to content

Instantly share code, notes, and snippets.

@xmas
Created July 5, 2017 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xmas/c8e32d44f75762a59ebb675fa72b54a3 to your computer and use it in GitHub Desktop.
Save xmas/c8e32d44f75762a59ebb675fa72b54a3 to your computer and use it in GitHub Desktop.
axios.post('/query/download', {
familyId: this.item.id,
queryName: 'test',
columnNames : this.columnNames
})
.then(function(response) {
let blob = new Blob([response.data], { type: 'text/csv' } )
let link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
link.download = 'test.csv'
link.click()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment