How to use @seagull/services-http - 1 common examples

To help you get started, we’ve selected a few @seagull/services-http 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 seagull-js / seagull / packages / services-soap / src / mode / seed.ts View on Github external
private async fetchWsdl(opts: ClientOptions): Promise {
    if (wsdlIsFile(opts)) {
      const wsdlString = fs.readFileSync(opts.wsdlPath, {
        encoding: 'utf-8',
      })
      return await Promise.resolve(wsdlString)
    } else {
      const creds = opts.credentials
      const headers = creds ? this.makeAuthHeader(creds) : {}
      const credentials = creds ? 'include' : undefined
      const init = { credentials, headers, method: 'GET', mode: 'cors' }
      const wsdlString = await (await new Http().get(
        opts.wsdlPath,
        init
      )).text()
      return wsdlString
    }
  }

@seagull/services-http

Http services for the seagull framework

LGPL-3.0
Latest version published 2 years ago

Package Health Score

49 / 100
Full package analysis

Popular @seagull/services-http functions