From b308c7f9fe52a0fd9d509851d9f333b2fad7bf7e Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Sun, 18 May 2025 22:36:25 +0200 Subject: [PATCH] fix: align yaml option with documentation --- docs/examples/with-multiple-requests.md | 2 +- src/execution/handlers/handlers.http.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples/with-multiple-requests.md b/docs/examples/with-multiple-requests.md index ccafc9f..629e301 100644 --- a/docs/examples/with-multiple-requests.md +++ b/docs/examples/with-multiple-requests.md @@ -2,7 +2,7 @@ First, create a resource: -```http #createUser,format=yaml +```http #createUser,yaml,json POST https://httpbin.org/post Content-Type: application/json diff --git a/src/execution/handlers/handlers.http.ts b/src/execution/handlers/handlers.http.ts index e0b08cb..32c5058 100644 --- a/src/execution/handlers/handlers.http.ts +++ b/src/execution/handlers/handlers.http.ts @@ -44,7 +44,7 @@ const httpHandler: ExecutionHandler = ({ ); let parsedBody = body; - if (options.format === 'yaml') { + if (options.yaml) { try { const parsed = YAML.parse(body); parsedBody = JSON.stringify(parsed);