+ {TextEnum.RESPONSE_SECTION_TITLE}
+
+ {TextEnum.RESPONSE_STATUS_LABEL}:
+ {status}
+
+
+ {TextEnum.URL_VALUE_LABEL}:
+ {url}
+
+ {
+ text !== undefined &&
+
{TextEnum.RESPONSE_BODY_LABEL}:
+
+
+ {text}
+
+
+
+ }
+ {
+ file && fileUrl &&
+ }
+ ;
+};
diff --git a/src/services/includers/batteries/openapi/plugin/public/components/Result.tsx b/src/services/includers/batteries/openapi/plugin/public/components/Result.tsx
new file mode 100644
index 00000000..d8725aac
--- /dev/null
+++ b/src/services/includers/batteries/openapi/plugin/public/components/Result.tsx
@@ -0,0 +1,81 @@
+import type {ResponseState, ErrorState} from '../types';
+import React, {useState, useEffect} from 'react';
+import {Loader} from './Loader';
+import {Response} from './Response';
+import {Error} from './Error';
+
+export const getAttachName = (response: Response): string => {
+ const unknownName = 'unknown file';
+ const disposition = response.headers.get('Content-Disposition');
+
+ if (disposition) {
+ const filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
+ const matches = filenameRegex.exec(disposition);
+ if (matches !== null && matches[1]) {
+ return matches[1].replace(/['"]/g, '');
+ }
+ }
+
+ return unknownName;
+};
+
+async function processResponse(response: Response): Promise