gistlib
index.tsxconst axios = require('axios'); const postData = async () => { try { const response = await axios.post('https://api.example.com', { key1: 'value1', key2: 'value2' }); console.log(response.data); } catch (error) { console.error(error); } }; postData(); 322 chars16 lines
const axios = require('axios'); const postData = async () => { try { const response = await axios.post('https://api.example.com', { key1: 'value1', key2: 'value2' }); console.log(response.data); } catch (error) { console.error(error); } }; postData();
gistlibby LogSnag