Add contentType application/hal+json support

Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/402

Differential Revision: D14663823

Pulled By: passy

fbshipit-source-id: 873a286f7d2e73c5cee4b9586adeadffa0292e43
This commit is contained in:
JianyingLi
2019-03-28 03:51:42 -07:00
committed by Facebook Github Bot
parent 0b72c6082f
commit 06e2379a78

View File

@@ -532,6 +532,7 @@ class JSONTextFormatter {
format = (body: string, contentType: string) => {
if (
contentType.startsWith('application/json') ||
contentType.startsWith('application/hal+json') ||
contentType.startsWith('text/javascript') ||
contentType.startsWith('application/x-fb-flatbuffer')
) {
@@ -589,6 +590,7 @@ class JSONFormatter {
format = (body: string, contentType: string) => {
if (
contentType.startsWith('application/json') ||
contentType.startsWith('application/hal+json') ||
contentType.startsWith('text/javascript') ||
contentType.startsWith('application/x-fb-flatbuffer')
) {
@@ -664,6 +666,7 @@ class GraphQLFormatter {
format = (body: string, contentType: string) => {
if (
contentType.startsWith('application/json') ||
contentType.startsWith('application/hal+json') ||
contentType.startsWith('text/javascript') ||
contentType.startsWith('text/html') ||
contentType.startsWith('application/x-fb-flatbuffer')