diff --git a/src/client/components/app/RequestDetails/ResponseBody.tsx b/src/client/components/app/RequestDetails/ResponseBody.tsx index 96cdcf62..f060c7fd 100644 --- a/src/client/components/app/RequestDetails/ResponseBody.tsx +++ b/src/client/components/app/RequestDetails/ResponseBody.tsx @@ -1,5 +1,5 @@ import type { PropType } from 'vue' -import { computed, defineComponent } from 'vue' +import { computed, defineComponent, ref } from 'vue' import type { UUID } from '../../../../shared/UUID' import type { UseResponse } from '../../../composables/response' import { useResponse } from '../../../composables/response' @@ -19,6 +19,7 @@ const getImageData = (response: UseResponse) => { const createBodyRenderer = (response: UseResponse) => { const classes = ['bordered', 'fill-height', 'pa-2', 'overflow-auto'] + const wrap = ref(true) if (response.isEmpty.value) return () => No response data @@ -27,8 +28,26 @@ const createBodyRenderer = (response: UseResponse) => { case 'text/html': case 'text/json': case 'application/json': + case 'application/javascript': + case 'text/css': case 'text/plain': - return () =>
{response.body.value}
+ return () => ( +
+
+ +
+
+            {response.body.value}
+          
+
+ ) } if (RX_IS_IMAGE.test(type)) {