perf(vue): 'validContentTypes' and 'knownContentTypes' can be computed
This commit is contained in:
@@ -1400,22 +1400,6 @@ export default {
|
|||||||
showTokenList: false,
|
showTokenList: false,
|
||||||
showTokenRequest: false,
|
showTokenRequest: false,
|
||||||
showTokenRequestList: false,
|
showTokenRequestList: false,
|
||||||
/**
|
|
||||||
* These are content types that can be automatically
|
|
||||||
* serialized by postwoman.
|
|
||||||
*/
|
|
||||||
knownContentTypes: ["application/json", "application/x-www-form-urlencoded"],
|
|
||||||
/**
|
|
||||||
* These are a list of Content Types known to Postwoman.
|
|
||||||
*/
|
|
||||||
validContentTypes: [
|
|
||||||
"application/json",
|
|
||||||
"application/hal+json",
|
|
||||||
"application/xml",
|
|
||||||
"application/x-www-form-urlencoded",
|
|
||||||
"text/html",
|
|
||||||
"text/plain",
|
|
||||||
],
|
|
||||||
commonHeaders,
|
commonHeaders,
|
||||||
showRequestModal: false,
|
showRequestModal: false,
|
||||||
editRequest: {},
|
editRequest: {},
|
||||||
@@ -1532,6 +1516,22 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
/**
|
||||||
|
* These are content types that can be automatically
|
||||||
|
* serialized by postwoman.
|
||||||
|
*/
|
||||||
|
knownContentTypes: () => ["application/json", "application/x-www-form-urlencoded"],
|
||||||
|
/**
|
||||||
|
* These are a list of Content Types known to Postwoman.
|
||||||
|
*/
|
||||||
|
validContentTypes: () => [
|
||||||
|
"application/json",
|
||||||
|
"application/hal+json",
|
||||||
|
"application/xml",
|
||||||
|
"application/x-www-form-urlencoded",
|
||||||
|
"text/html",
|
||||||
|
"text/plain",
|
||||||
|
],
|
||||||
uri: {
|
uri: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.request.uri ? this.$store.state.request.uri : this.url + this.path
|
return this.$store.state.request.uri ? this.$store.state.request.uri : this.url + this.path
|
||||||
|
|||||||
Reference in New Issue
Block a user