From 81e00405cdb68240747926d3c91541cb67b76c2c Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Thu, 7 Sep 2023 10:57:36 +0100 Subject: [PATCH] Send Content-Type: application/json on login --- internal/instruction/runner.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/instruction/runner.go b/internal/instruction/runner.go index ec8e7039..947d7077 100644 --- a/internal/instruction/runner.go +++ b/internal/instruction/runner.go @@ -276,6 +276,11 @@ func (r *Runner) next(instrs []instruction, hsURL string, i int) (*http.Request, return nil, nil, 0 } + if body != nil { + // all bodies, if set, are JSON encoded + req.Header["Content-Type"] = []string{"application/json"} + } + q := req.URL.Query() if instr.accessToken != "" { at, ok := r.lookup.Load(instr.accessToken)