-
+
+
+
+ {{ $t("empty.body") }}
+
+
@@ -59,11 +76,7 @@ export default defineComponent({
return {
validContentTypes: Object.keys(knownContentTypes),
- contentType: useStream(
- restContentType$,
- "application/json",
- setRESTContentType
- ),
+ contentType: useStream(restContentType$, null, setRESTContentType),
}
},
})
diff --git a/components/http/RawBody.vue b/components/http/RawBody.vue
index c35d1657b..2640af832 100644
--- a/components/http/RawBody.vue
+++ b/components/http/RawBody.vue
@@ -31,7 +31,7 @@
@click.native="clearContent('rawParams', $event)"
/>
{
contentType: newContentType,
- body: curr.request.body.body,
+ body:
+ newContentType === null
+ ? undefined
+ : (curr.request.body as any).body,
},
},
}
@@ -591,7 +593,7 @@ export function updateFormDataEntry(index: number, entry: FormDataKeyValue) {
})
}
-export function setRESTContentType(newContentType: ValidContentTypes) {
+export function setRESTContentType(newContentType: ValidContentTypes | null) {
restSessionStore.dispatch({
dispatcher: "setContentType",
payload: {