From 06ec1f69e11fc52c0e2c6b5f12c3c89b9ef18436 Mon Sep 17 00:00:00 2001
From: Tom van der Lee <tom@vanderlee.io>
Date: Fri, 17 Oct 2025 15:52:17 +0200
Subject: Added json view of encoded params

---
 src/components/Content/Content.tsx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

(limited to 'src/components/Content/Content.tsx')

diff --git a/src/components/Content/Content.tsx b/src/components/Content/Content.tsx
index 94fca32..19736fb 100644
--- a/src/components/Content/Content.tsx
+++ b/src/components/Content/Content.tsx
@@ -128,6 +128,21 @@ function ContentBody({ data, raw = false }: Omit<ContentProps, "setRaw">) {
     );
   }
 
+  if (contentType?.startsWith("application/x-www-form-urlencoded")) {
+    return (
+      <ReactJson
+        src={Object.fromEntries(new URLSearchParams(atob(data.body)))}
+        theme={darkMode ? "monokai" : undefined}
+        style={{
+          padding: "1em",
+          width: "100%",
+          height: "100%",
+          overflowY: "auto",
+        }}
+      />
+    );
+  }
+
   if (contentType?.startsWith("audio")) {
     return <audio src={`data:${contentType};base64,${data.body}`} />;
   }
-- 
cgit v1.2.3

