From cc34ab0a5bdf33ec99dc5d6cf253831b9e056868 Mon Sep 17 00:00:00 2001 From: Daniel Bayley Date: Tue, 4 Nov 2025 00:01:29 +0000 Subject: [PATCH] refactor: improve ruby example --- src/targets/ruby/native/client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/targets/ruby/native/client.ts b/src/targets/ruby/native/client.ts index e9c26821..cce8a549 100644 --- a/src/targets/ruby/native/client.ts +++ b/src/targets/ruby/native/client.ts @@ -16,6 +16,7 @@ export const native: Client = { push("require 'uri'"); push("require 'net/http'"); + push("require 'json'"); blank(); // To support custom methods we check for the supported methods @@ -64,7 +65,7 @@ export const native: Client = { } if (postData.text) { - push(`request.body = ${JSON.stringify(postData.text)}`); + push(`request.body = ${postData.text}.to_json`); } blank();