How to use the gofer function in gofer

To help you get started, we’ve selected a few gofer 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 groupon / quinn / examples / hello-world / index.js View on Github external
.listen(async () => {
    const baseUrl = `http://127.0.0.1:${server.address().port}`;
    const gofer = new Gofer({ globalDefaults: { baseUrl } });

    try {
      await gofer.fetch('/foo');
    } catch (err) {
      console.log(err);
    }

    console.log('\n===\n');

    await fetchAndPrint(gofer, '/bar');

    server.close();
  });

gofer

A general purpose service client library

BSD-3-Clause
Latest version published 2 months ago

Package Health Score

74 / 100
Full package analysis

Popular gofer functions