Hide download response button for non-JSON responses
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user