From d6d95a35ba579d1e4cc3f342b0befc614c4fa827 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 28 Jun 2023 22:14:52 +0100 Subject: [PATCH] Change default content type to JSON Change the default content type to `application/json`. It was always ignored anyway, but I've made another PR in fn_go that means that it will be used: https://github.com/fnproject/fn_go/pull/56 Once that PR is merged we should revendor `fn_go` with this PR. --- client/invoke.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/invoke.go b/client/invoke.go index d9d450ab..21fa81e2 100644 --- a/client/invoke.go +++ b/client/invoke.go @@ -80,7 +80,7 @@ func Invoke(provider provider.Provider, ireq InvokeRequest) (*http.Response, err if contentType != "" { req.Header.Set("Content-Type", contentType) } else { - req.Header.Set("Content-Type", "text/plain") + req.Header.Set("Content-Type", "application/json") } if len(env) > 0 {