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:
@@ -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 () => {
|
||||
|
Reference in New Issue
Block a user