Skip to content

Instantly share code, notes, and snippets.

View BarkaouiMohamed's full-sized avatar

BarkaouiMohamed

  • Ariana, Tunisie
View GitHub Profile
@fuzunspm
fuzunspm / client-axios.js
Last active January 15, 2024 22:54
Nestjs File download
export default class http {
async download(endpoint) {
const token = this.loadToken();
const invoice = await axios({
url: `${this.NEST_APP_IP}/${endpoint}`,
method: 'GET',
responseType: 'blob',
headers: {
Authorization: `Bearer ${token}`
}}).then((response) => {