Say you have the following component in your next js project
path: components/ProfileImage.js
import Image from "next/image";
import PropTypes from "prop-types";| 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); |
| import os | |
| import urllib3 | |
| import json | |
| from urllib.parse import urlencode | |
| http = urllib3.PoolManager() | |
| token = os.environ.get("TRELLO_TOKEN") | |
| secret = os.environ.get("TRELLO_SECRET") | |
| board_id = os.environ.get("TRELLO_BOARD") |