Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Only show prettify button when request body is JSON

Samir L. Boulema5c5fa5c4bc94
diff --git a/pages/index.vue b/pages/index.vue
index 6bc86c36a..9689bff61 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -266,6 +266,7 @@
class="icon"
@click="prettifyRequestBody()"
v-tooltip="$t('prettify_body')"
+ v-if="this.contentType.endsWith('json')"
>
<i class="material-icons">assistant</i>
</button>