From 5164c8d10107c6f8124d2841fbab51817418d837 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Wed, 9 Feb 2022 20:28:21 +0800 Subject: [PATCH 1/2] change: update docs --- README.md | 6 ++++++ docs/README.md | 1 + 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 2370cec6..19d82ec7 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ `hrp` aims to be a one-stop solution for HTTP(S) testing, covering API testing, load testing and digital experience monitoring (DEM). See [CHANGELOG]. + +> 欢迎参加 HttpRunner [用户调研问卷][survey],你的反馈将帮助 HttpRunner 更好地成长! + ## Key Features ![flow chart](docs/assets/flow.jpg) @@ -296,6 +299,8 @@ func TestCaseDemo(t *testing.T) { HttpRunner +如果你期望加入 HttpRunner 核心用户群,请填写[用户调研问卷][survey]并留下你的联系方式,作者将拉你进群。 + [HttpRunner]: https://github.com/httprunner/httprunner [boomer]: https://github.com/myzhan/boomer [locust]: https://github.com/locustio/locust @@ -308,3 +313,4 @@ func TestCaseDemo(t *testing.T) { [examples]: https://github.com/httprunner/hrp/blob/main/examples/ [CHANGELOG]: docs/CHANGELOG.md [pushgateway]: https://github.com/prometheus/pushgateway +[survey]: https://wenjuan.feishu.cn/m?t=sVRvigY12Szi-gbbo diff --git a/docs/README.md b/docs/README.md index d2dfb861..55d864b5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,6 +2,7 @@ - Homepage: https://httprunner.com - Docs + - Repo: https://github.com/httprunner/httprunner.github.io - 中文: https://httprunner.com/docs - English: https://httprunner.com/en/docs - [hrp command help](cmd/hrp.md) From d35124bebaa66b9e0d39bdd08d1ffcf34b23d724 Mon Sep 17 00:00:00 2001 From: lihuacai Date: Thu, 10 Feb 2022 14:21:19 +0800 Subject: [PATCH 2/2] fix: custom content-type prior to default --- runner.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runner.go b/runner.go index 2d976c73..836dfbd5 100644 --- a/runner.go +++ b/runner.go @@ -678,7 +678,9 @@ func (r *caseRunner) runStepRequest(step *TStep) (stepResult *stepData, err erro if err != nil { return stepResult, err } - req.Header.Set("Content-Type", "application/json; charset=UTF-8") + if req.Header.Get("Content-Type") == "" { + req.Header.Set("Content-Type", "application/json; charset=utf-8") + } } case string: dataBytes = []byte(vv)