Untitled
Anonymous
javascript
12/28/2023 9:26 PM
612 B
17
Indexable
// Make HTTP Requests programatically
const axios = require('axios');
// Pull environment variables from .env file
require('dotenv').config();
// Get original file contents
async function getRawFile(filePath) {
const getResult = await axios({
method: 'get',
url: `https://git.nmlv.nml.com/api/v4/projects/{project Id here}/repository/files/${filePath}/raw`,
headers: {
'PRIVATE-TOKEN': process.env.PRIVATE_TOKEN,
},
});
}Editor is loading...
Leave a Comment