lib/test/acceptance-test.ts
Function request
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async request(options: { method: string, url: string, body?: any, headers?: { [key: string]: string } }): Promise<{ status: number, body: any }> {
let body: any = null;
options.headers = mapKeys(options.headers, (value, key) => key.toLowerCase()) || {};
if (options.body) {
body = typeof options.body === 'string' ? options.body : JSON.stringify(options.body);