Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
Hide download response button for non-JSON responses
Andrew Bastind111e219c2a5
diff --git a/pages/index.vue b/pages/index.vueindex 62d2769d6..1a0ae504e 100644--- a/pages/index.vue+++ b/pages/index.vue@@ -973,7 +973,7 @@class="icon"@click="downloadResponse"ref="downloadResponse"- v-if="response.body"+ v-if="response.body && canDownloadResponse"v-tooltip="$t('download_file')"><i class="material-icons">get_app</i>@@ -1612,6 +1612,14 @@ export default {isJSONContentType(this.contentType))},+ canDownloadResponse() {+ return (+ this.response &&+ this.response.headers &&+ this.response.headers["content-type"] &&+ isJSONContentType(this.response.headers["content-type"])+ )+ },uri: {get() {return this.$store.state.request.uri ? this.$store.state.request.uri : this.url + this.path