Skip to content

Commit 2dc1b8c

Browse files
committed
fix: request entity too large
1 parent 4df1c5b commit 2dc1b8c

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/dts/typed-router.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ declare module 'vue-router/auto-routes' {
1919
*/
2020
export interface RouteNamedMap {
2121
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
22-
'/dev': RouteRecordInfo<'/dev', '/dev', Record<never, never>, Record<never, never>>,
2322
}
2423
}

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"unplugin-vue-components": "^0.27.4",
3535
"unplugin-vue-router": "^0.10.8",
3636
"url-template": "^3.1.1",
37-
"vite": "^6.2.4",
37+
"vite": "^6.3.5",
3838
"vite-plugin-node-polyfills": "^0.23.0",
3939
"vite-plugin-vuetify": "^2.1.0",
4040
"vue": "^3.5.13",

ui/src/components/operation.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,17 @@ async function executeRequest () {
253253
body = formData
254254
} else {
255255
headers['Content-Type'] = contentType
256-
body = endpointQueryValues.value.body.value
256+
const rawBody = endpointQueryValues.value.body.value
257+
// JSON minification to reduce payload size (remove unnecessary spaces/indentations)
258+
if (rawBody != null && (contentType.startsWith('application/json') || contentType.includes('+json'))) {
259+
try {
260+
body = JSON.stringify(JSON.parse(rawBody))
261+
} catch (e) { // If JSON parsing fails, use the raw body
262+
body = rawBody.trim()
263+
}
264+
} else {
265+
body = rawBody
266+
}
257267
}
258268
}
259269

0 commit comments

Comments
 (0)