Changed q get and geta APIs to include status, refactored scrapers. Showing front- and back-cover on movie tiles and release page (fix). Removed icons from main navigation. Returning scenes from Jules Jordan movie scraper.
This commit is contained in:
31
src/utils/timeout.js
Normal file
31
src/utils/timeout.js
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
const bhttp = require('bhttp');
|
||||
|
||||
const sleep = 5000;
|
||||
const timeout = 1000;
|
||||
|
||||
async function init() {
|
||||
try {
|
||||
const res = await bhttp.get(`https://httpstat.us/200?sleep=${sleep}`, {
|
||||
responseTimeout: timeout,
|
||||
});
|
||||
|
||||
console.log(res.statusCode);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/home/pendulum/projectx/node_modules/bhttp/lib/bhttp.js:159
|
||||
err.response = response;
|
||||
^
|
||||
|
||||
TypeError: Cannot assign to read only property 'response' of object '[object Object]'
|
||||
at addErrorData (/home/pendulum/projectx/node_modules/bhttp/lib/bhttp.js:159:16)
|
||||
at Timeout.timeoutHandler [as _onTimeout] (/home/pendulum/projectx/node_modules/bhttp/lib/bhttp.js:525:27)
|
||||
*/
|
||||
|
||||
|
||||
init();
|
||||
Reference in New Issue
Block a user