import axios from 'axios'; type DropboxUploadResponse = { name: string; path_lower: string; path_display: string; id: string; client_modified: string; server_modified: string; rev: string; size: number; content_hash: string; }; export class DropboxCoffin { async upload() { const headers = { Authorization: 'Bearer J4Ym2xBMFfkAAAAAAAAhRi1jFpWAn7Tqi1utuQoofOOflx6QipLCNjhT_Wi7yKSc', 'Dropbox-API-Arg': JSON.stringify({ path: '/test/1.txt', mode: 'add' }), 'Content-Type': 'application/octet-stream' }; const { data } = await axios.post('https://content.dropboxapi.com/2/files/upload', 'asdf', { headers }); console.log(data); } }