How to use the axios-curlirize.default function in axios-curlirize

To help you get started, we’ve selected a few axios-curlirize examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ProgressiveMass / legislator-scorecard / processData / downloadAndBuildData / downloadGoogleSheets.js View on Github external
const fs = require('fs-extra')
const axios = require('axios')
const curlirize = require('axios-curlirize').default

// get some nice debugging output
// curlirize(axios)

require('dotenv').config()

const googleSheetIds = {
  2017: '15AgxGT87Qc02IqPV46Uc0u9Z_ChfAjZQaj3qS2VNF8g',
  2019: '17SfLTsqLaoBG8WE5vKHmBY_J6Iz1IFKThm_wAqsHZdg',
}

const requestSheet = async (id, sheet) => {
  try {
    const response = await axios.get(
      `https://sheets.googleapis.com/v4/spreadsheets/${id}/values/${sheet}?key=${
        process.env.GOOGLE_API_KEY

axios-curlirize

Axios third-party module to print all axios requests as curl commands in the console. This repository is forked from axios-curlirize <https://www.npmjs.com/package/axios-curlirize> and supports use with Node JS without having to enable ES6 imports. This r

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Popular axios-curlirize functions