Configured Reality Kings to fetch session from RK scene overview.
This commit is contained in:
43
src/tools/realitykings.js
Normal file
43
src/tools/realitykings.js
Normal file
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
const https = require('https');
|
||||
const bhttp = require('bhttp');
|
||||
const fetch = require('node-fetch');
|
||||
const { request } = require('undici');
|
||||
const express = require('express');
|
||||
|
||||
async function init() {
|
||||
const res = await fetch('https://www.realitykings.com/scenes?site=45', {
|
||||
method: 'HEAD',
|
||||
headers: {
|
||||
'user-agent': 'HTTPie/2.6.0',
|
||||
'accept-encoding': 'gzip, deflate, br',
|
||||
accept: '*/*',
|
||||
connection: 'keep-alive',
|
||||
},
|
||||
});
|
||||
|
||||
console.log(res.status, res.headers);
|
||||
|
||||
const app = express();
|
||||
|
||||
app.get('/', (appReq, appRes) => {
|
||||
console.log(appReq.headers);
|
||||
appRes.status(204).send();
|
||||
});
|
||||
|
||||
app.listen(8000, () => {
|
||||
console.log('Listening on port 8000');
|
||||
|
||||
fetch('http://127.0.0.1:8000', {
|
||||
headers: {
|
||||
'user-agent': 'HTTPie/2.6.0',
|
||||
'accept-encoding': 'gzip, deflate, br',
|
||||
accept: '*/*',
|
||||
connection: 'keep-alive',
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
Reference in New Issue
Block a user