fix(handlerproxy): Use SmartRequest API and improve proxy/asset response handling; update tests and bump dependencies; add local project configuration files

This commit is contained in:
2025-08-17 08:14:08 +00:00
parent db05fc91c4
commit 8cbae75ae4
8 changed files with 140 additions and 35 deletions

View File

@@ -95,15 +95,18 @@ tap.test('should start the server allright', async () => {
// see if a demo request holds up
tap.test('should issue a request', async (tools) => {
const response = await smartrequest.postJson('http://127.0.0.1:3000/someroute', {
headers: {
const smartRequestInstance = smartrequest.SmartRequest.create();
const response = await smartRequestInstance
.url('http://127.0.0.1:3000/someroute')
.headers({
'X-Forwarded-Proto': 'https',
},
requestBody: {
})
.json({
someprop: 'hi',
},
});
console.log(response.body);
})
.post();
const responseBody = await response.text();
console.log(responseBody);
});
tap.test('should get a file from disk', async () => {