Untitled
unknown
javascript
2 years ago
457 B
6
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