From 88cbbe69b2057d7700cec4099c962daccc65cc03 Mon Sep 17 00:00:00 2001 From: Matt Gardner Date: Fri, 20 Mar 2020 22:08:05 -0400 Subject: [PATCH] Add application/vnd.api+json Add application/vnd.api+json to the places where content type matters --- pages/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index c3bdee4b0..956542b2a 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1439,6 +1439,7 @@ export default { const getDefaultParams = contentType => { switch (contentType) { case "application/json": + case "application/vnd.api+json": case "application/hal+json": return "{}" case "application/xml": @@ -1463,7 +1464,8 @@ export default { } else { if ( this.responseType === "application/json" || - this.responseType === "application/hal+json" + this.responseType === "application/hal+json" || + this.responseType === "application/vnd.api+json" ) { this.responseBodyText = JSON.stringify(this.response.body, null, 2) this.responseBodyType = "json" @@ -1531,12 +1533,13 @@ export default { * These are content types that can be automatically * serialized by postwoman. */ - knownContentTypes: () => ["application/json", "application/x-www-form-urlencoded"], + knownContentTypes: () => ["application/json", "application/x-www-form-urlencoded", "application/vnd.api+json"], /** * These are a list of Content Types known to Postwoman. */ validContentTypes: () => [ "application/json", + "application/vnd.api+json", "application/hal+json", "application/xml", "application/x-www-form-urlencoded", @@ -1547,6 +1550,7 @@ export default { return [ "application/json", "application/hal+json", + "application/vnd.api+json", "application/x-www-form-urlencoded", ].includes(this.contentType) },