Skip to content

Instantly share code, notes, and snippets.

View iknowcss's full-sized avatar

Cody Jenkins iknowcss

  • DiUS Computing
  • Sydney, Australia
View GitHub Profile
@iknowcss
iknowcss / length.js
Last active February 20, 2019 05:40
alert('123'.length);

Keybase proof

I hereby claim:

  • I am iknowcss on github.
  • I am iknowcss (https://keybase.io/iknowcss) on keybase.
  • I have a public key ASDct6VQLNdaYrehaAuBX8PanDN1VB_sRx16pK2GUXdEFgo

To claim this, I am signing this object:

@qantas/request-client

Overview

@qantas/request-client is a proposed node.js library to simplify making web API calls. It is an extention of request and request-promise. The extensions make it easy to:

  • auto-retry API calls which don't return 2xx status codes and
  • integrate with the Qantas WSO2 API gateway

As this library is an extension request, all configuration options which are available there are also available here. In addition, you may provide middlewares to shape the final options object which is ultimately passed to request.

import sinon from 'sinon';
import request from 'request';
import { Pact } from '@pact-foundation/pact';
/// - Test setup ---------------------------------------------------------------
const provider = new Pact({
consumer: 'xiaofeizhe',
provider: 'tigongshang'
});