Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const HttpClient2 = require('urllib').HttpClient2;
const urllib = new HttpClient2();
exports.urllib = {
keepAlive: false,
foo: null,
bar: undefined,
n: 1,
dd: new Date(),
httpclient: urllib,
};
exports.buffer = new Buffer('1234');
exports.array = [];
exports.console = console;
exports.zero = 0;
private makeRequest(params: AlipayPublicArgs, options: urllib.RequestOptions = {}): Promise {
const httpclient: urllib.HttpClient2 = new urllib.HttpClient2()
return httpclient.request(this.gateWay, { data: params, dataType: 'json', dataAsQueryString: true, ...options })
.then((resp: urllib.HttpClientResponse) => this.makeResponse(resp.data))
}