How to use the http-call.HTTP.get function in http-call

To help you get started, we’ve selected a few http-call 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 jdxcode / tmux-weather / src / tmux-weather.ts View on Github external
const getWeather = cache('weather', async ({ latitude, longitude }: LatLon) => {
  // notify('fetching weather data')
  debug('fetching weather...')
  const { body } = await HTTP.get(`https://api.forecast.io/forecast/${forecastIOApiKey}/${latitude},${longitude}`)
  return body as IWeatherResponse
})
github heroku / cli / packages / pipelines-v5 / lib / github-api.js View on Github external
request (url, options = {}) {
    options.headers = Object.assign({
      Authorization: `Token ${this.token}`,
      'User-Agent': this.version
    }, options.headers)

    return HTTP.get(`${GITHUB_API}${url}`, options)
  }

http-call

make http requests

ISC
Latest version published 4 years ago

Package Health Score

66 / 100
Full package analysis