From 7546dbf9cf115ef4b4e29389a081d6a03a9adc29 Mon Sep 17 00:00:00 2001 From: Garry Trinder Date: Tue, 1 Apr 2025 16:58:09 +0100 Subject: [PATCH] Refactor dev-proxy-toolkit.raise-mock command to use new API endpoint. Closes #222 Closes #222 --- CHANGELOG.md | 1 + src/commands.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed390a1..aeca6d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Command: Refactored stop command logic - Diagnostics: Changed check to ensure at least one plugin from Error to Warning +- Command: `dev-proxy-toolkit.raise-mock` refactored to use new API endpoint ## [0.18.3] - 2025-03-03 diff --git a/src/commands.ts b/src/commands.ts index b5e679e..4408d5c 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -145,7 +145,7 @@ export const registerCommands = (context: vscode.ExtensionContext, configuration context.subscriptions.push( vscode.commands.registerCommand('dev-proxy-toolkit.raise-mock', async () => { const apiPort = configuration.get('apiPort') as number; - await fetch(`http://localhost:${apiPort}/proxy/raisemockrequest`, { + await fetch(`http://localhost:${apiPort}/proxy/mockrequest`, { method: 'POST', headers: { 'Content-Type': 'application/json'