Skip to content

Commit

Permalink
delete
Browse files Browse the repository at this point in the history
  • Loading branch information
vdesabou committed Dec 15, 2023
1 parent 1ac7098 commit 00fe0ff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions connect/connect-http-sink/httpserver-oauth2/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ app.put('/', authenticateRequest, (req, res) => {
console.log(`[${new Date().toISOString()}] sending back ${errorCode}`);
});

app.delete('/', authenticateRequest, (req, res) => {
res.status(errorCode).json({ message: `Returned status: ${errorCode}` });
console.log("headers:");
console.log(req.headers);
console.log("body:");
console.log(req.body);
console.log(`[${new Date().toISOString()}] sending back ${errorCode}`);
});

app.put('/set-response-error-code', (req, res) => {
if(req.body.errorCode && typeof req.body.errorCode === "number") {
errorCode = req.body.errorCode;
Expand Down
9 changes: 9 additions & 0 deletions connect/connect-http-sink/httpserver/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ app.put('/', (req, res) => {
console.log(`[${new Date().toISOString()}] sending back ${errorCode}`);
});

app.delete('/', (req, res) => {
res.status(errorCode).json(responseBody);
console.log("headers:");
console.log(req.headers);
console.log("body:");
console.log(req.body);
console.log(`[${new Date().toISOString()}] sending back ${errorCode}`);
});

app.put('/set-response-error-code', (req, res) => {
if(req.body.errorCode && typeof req.body.errorCode === "number") {
errorCode = req.body.errorCode;
Expand Down

0 comments on commit 00fe0ff

Please sign in to comment.