|
@@ -4,7 +4,6 @@ import (
|
|
|
"bytes"
|
|
"bytes"
|
|
|
"context"
|
|
"context"
|
|
|
json2 "encoding/json"
|
|
json2 "encoding/json"
|
|
|
- "fmt"
|
|
|
|
|
"io/ioutil"
|
|
"io/ioutil"
|
|
|
"net/http"
|
|
"net/http"
|
|
|
"strings"
|
|
"strings"
|
|
@@ -218,8 +217,7 @@ func contentSubtype(contentType string) string {
|
|
|
func SetBody(ctx context.Context, r *http.Request) context.Context {
|
|
func SetBody(ctx context.Context, r *http.Request) context.Context {
|
|
|
b, _ := ioutil.ReadAll(r.Body)
|
|
b, _ := ioutil.ReadAll(r.Body)
|
|
|
if len(b) > 0 {
|
|
if len(b) > 0 {
|
|
|
- fmt.Println(string(b))
|
|
|
|
|
- ctx = context2.AppendToContext(ctx, "body", b)
|
|
|
|
|
|
|
+ ctx = context2.AppendToContext(ctx, "body", r.Body)
|
|
|
}
|
|
}
|
|
|
return ctx
|
|
return ctx
|
|
|
}
|
|
}
|