Skip to content

Commit 16ca484

Browse files
Merge pull request #815 from cloudnautique/main
chore: add content length when handling json request bodies.
2 parents 3f2a8ee + 83622e6 commit 16ca484

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/openapi/run.go

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ func Run(operationID, defaultHost, args string, t *openapi3.T, envs []string) (s
107107
return "", false, fmt.Errorf("failed to encode JSON: %w", err)
108108
}
109109
req.Header.Set("Content-Type", "application/json")
110+
req.ContentLength = int64(body.Len())
110111

111112
case "text/plain":
112113
reqBody := ""

0 commit comments

Comments
 (0)