fix(core): update

This commit is contained in:
Philipp Kunz 2020-10-15 18:46:21 +00:00
parent 2b6d9c961c
commit 11746c61bd
2 changed files with 6 additions and 4 deletions

View File

@ -52,8 +52,8 @@ tap.test('first test', async (tools) => {
const response2 = await new webrequest.WebRequest().getJson('http://localhost:2345/apiroute3');
console.log(response);
console.log(response2);
console.log('response 1: ' + JSON.stringify(response));
console.log('response 2: ' + JSON.stringify(response2));
expect(response).property('hithere').to.equal('hi');
expect(response2).property('hithere').to.equal('hi');

View File

@ -123,9 +123,11 @@ export class WebRequest {
if (response.status >= 200 && response.status < 300) {
return response;
} else {
// lets perform a history check to determine failed urls
await doHistoryCheck(response.status.toString());
// tslint:disable-next-line: no-return-await
return await doRequest(allUrls[usedUrlIndex]);
// lets fire the request
const result = await doRequest(allUrls[usedUrlIndex]);
return result;
}
};