diff --git a/components/http/Body.vue b/components/http/Body.vue index b1195fe3f..3f67cfa7a 100644 --- a/components/http/Body.vue +++ b/components/http/Body.vue @@ -24,11 +24,20 @@ + - + +
+ + {{ $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: {