How to use the http-call.stream 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 heroku / cli / packages / heroku-run / lib / log_displayer.js View on Github external
async function readLogsV1 (logplexURL) {
  let {response} = await HTTP.stream(logplexURL)
  return new Promise(function (resolve, reject) {
    response.setEncoding('utf8')
    liner.setEncoding('utf8')
    response.pipe(liner)
    liner.on('data', line => cli.log(colorize(line)))
    response.on('end', resolve)
    response.on('error', reject)
  })
}
github heroku / cli / packages / run-v5 / lib / log_displayer.js View on Github external
async function readLogsV1 (logplexURL) {
  let {response} = await HTTP.stream(logplexURL)
  return new Promise(function (resolve, reject) {
    response.setEncoding('utf8')
    liner.setEncoding('utf8')
    response.pipe(liner)
    liner.on('data', line => cli.log(colorize(line)))
    response.on('end', resolve)
    response.on('error', reject)
  })
}
github heroku / cli / packages / run / src / lib / log-displayer.ts View on Github external
async function readLogsV1(logplexURL: string) {
  const {response} = await HTTP.stream(logplexURL)
  return new Promise(function (resolve, reject) {
    response.setEncoding('utf8')
    liner.setEncoding('utf8')
    response.pipe(liner)
    liner.on('data', line => cli.log(colorize(line)))
    response.on('end', resolve)
    response.on('error', reject)
  })
}

http-call

make http requests

ISC
Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis