This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| import * as Axios from 'axios'; | |
| const CONFIG = Object.assign({ | |
| headers: { | |
| Accept: 'application/json', | |
| 'Content-Type': 'application/json', | |
| }, | |
| }); | |
| const setNoCache = (config) => { |
| import Vue from 'vue' | |
| import { Route } from 'vue-router' | |
| import { Store } from 'vuex' | |
| import { MetaInfo } from 'vue-meta' | |
| import { AxiosInstance } from 'axios' | |
| interface NuxtContext { | |
| isClient: boolean | |
| isServer: boolean | |
| isStatic: boolean |
| axios({ | |
| url: 'http://localhost:5000/static/example.pdf', | |
| method: 'GET', | |
| responseType: 'blob', // important | |
| }).then((response) => { | |
| const url = window.URL.createObjectURL(new Blob([response.data])); | |
| const link = document.createElement('a'); | |
| link.href = url; | |
| link.setAttribute('download', 'file.pdf'); | |
| document.body.appendChild(link); |