src/requests.js
Function post
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const post = async (lokiUrl, contentType, headers = {}, data = '', timeout, httpAgent, httpsAgent) => {
// Construct a buffer from the data string to have deterministic data size
const dataBuffer = Buffer.from(data, 'utf8')
// Construct the headers