! http requests that include '?' are failing - CRITICAL

Hi @muiznieks,

Thanks for sharing your workflow.

By default, when you import an NPM package like axios, Pipedream will import the latest version.

Yesterday, the axios maintainer released v1.0.0 of axios.

This is a major upgrade, the prior version was v0.27.2.

You can still define a specific version of axios in an import like so:

import axios from 'axios@v0.27.2'

This will use the older version that does not include this ? stripping from the URL.

Alternatively, you can use the params argument in the configuration to define your query parameters:

// the "params" argument is supported in all versions of axios
import axios from "axios"

export default defineComponent({
  async run({ steps, $ }) {
    const { data } = await axios({
      method: "GET",
      url: 'https://ipinfo.io/<an ip address>',
      params: {
        token: "<your token>"
      }
    })
    return data
  },
})

Alternatively, you can use the Pipedream axios instance, which we recommend since it gives you more details about errors in your individual steps:

1 Like