UNPKG

simplerestclients

Version:

A library of components for accessing RESTful services with javascript/typescript.

30 lines (26 loc) 662 B
export const REQUEST_OPTIONS = { excludeEndpointUrl: false, withCredentials: false, contentType: 'json', priority: 2, retries: 0, }; export const REQUEST_HEADERS = { 'Content-Type': 'application/json', 'Accept': 'application/json', }; export const DETAILED_RESPONSE = { requestOptions: REQUEST_OPTIONS, requestHeaders: REQUEST_HEADERS, statusCode: 200, statusText: undefined, headers: { 'content-type': 'application/json' }, body: '', url: '', }; export function asyncTick(): Promise<void> { return new Promise((res, rej) => { setTimeout(res, 0); jasmine.clock().tick(10); }); }