fix(core): update
This commit is contained in:
parent
2b6d9c961c
commit
11746c61bd
@ -52,8 +52,8 @@ tap.test('first test', async (tools) => {
|
|||||||
|
|
||||||
const response2 = await new webrequest.WebRequest().getJson('http://localhost:2345/apiroute3');
|
const response2 = await new webrequest.WebRequest().getJson('http://localhost:2345/apiroute3');
|
||||||
|
|
||||||
console.log(response);
|
console.log('response 1: ' + JSON.stringify(response));
|
||||||
console.log(response2);
|
console.log('response 2: ' + JSON.stringify(response2));
|
||||||
|
|
||||||
expect(response).property('hithere').to.equal('hi');
|
expect(response).property('hithere').to.equal('hi');
|
||||||
expect(response2).property('hithere').to.equal('hi');
|
expect(response2).property('hithere').to.equal('hi');
|
||||||
|
@ -123,9 +123,11 @@ export class WebRequest {
|
|||||||
if (response.status >= 200 && response.status < 300) {
|
if (response.status >= 200 && response.status < 300) {
|
||||||
return response;
|
return response;
|
||||||
} else {
|
} else {
|
||||||
|
// lets perform a history check to determine failed urls
|
||||||
await doHistoryCheck(response.status.toString());
|
await doHistoryCheck(response.status.toString());
|
||||||
// tslint:disable-next-line: no-return-await
|
// lets fire the request
|
||||||
return await doRequest(allUrls[usedUrlIndex]);
|
const result = await doRequest(allUrls[usedUrlIndex]);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user