diff --git a/src/components/api/Try.vue b/src/components/api/Try.vue index aacd2a17..a4a35555 100644 --- a/src/components/api/Try.vue +++ b/src/components/api/Try.vue @@ -7,6 +7,9 @@
{{ $t('api.entity.response') }}
+
+ +
@@ -35,11 +38,14 @@ export default defineComponent({ data() { return { apiKeyValue: this.apiKey, - responseData: '' + responseData: '', + loading: false }; }, methods: { onTry() { + this.loading = true; + this.responseData = ''; const config = { method: this.api?.request?.method as Method, url: urlJoin(this.api?.endpoint, this.api?.path), @@ -49,9 +55,11 @@ export default defineComponent({ console.debug('config of testing', config); axios(config) .then((response) => { + this.loading = false; this.responseData = JSON.stringify(response?.data, null, ' '); }) .catch((error) => { + this.loading = false; this.responseData = JSON.stringify(error?.response?.data, null, ' '); }); } diff --git a/src/components/common/MarkdownRenderer.vue b/src/components/common/MarkdownRenderer.vue index 8e40e41a..35fd0953 100644 --- a/src/components/common/MarkdownRenderer.vue +++ b/src/components/common/MarkdownRenderer.vue @@ -1,5 +1,10 @@