Skip to content

Commit 6bee92a

Browse files
committed
DeBuGgInG
1 parent d03040a commit 6bee92a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

utils/request/request.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http"
88
"strings"
99

10+
"github.com/codeshelldev/secured-signal-api/utils"
1011
"github.com/codeshelldev/secured-signal-api/utils/logger"
1112
"github.com/codeshelldev/secured-signal-api/utils/query"
1213
)
@@ -99,8 +100,6 @@ func GetBody(req *http.Request) ([]byte, error) {
99100
func GetReqBody(w http.ResponseWriter, req *http.Request) (Body, error) {
100101
bytes, err := GetBody(req)
101102

102-
logger.Dev(string(bytes))
103-
104103
var isEmpty bool
105104

106105
if err != nil {
@@ -134,6 +133,8 @@ func GetReqBody(w http.ResponseWriter, req *http.Request) (Body, error) {
134133
}
135134
}
136135

136+
logger.Dev(utils.ToJson(data))
137+
137138
isEmpty = len(data) <= 0
138139

139140
return Body{
@@ -156,6 +157,6 @@ func GetBodyType(req *http.Request) BodyType {
156157
case strings.HasPrefix(contentType, "application/x-www-form-urlencoded"):
157158
return Form
158159
default:
159-
return Unknown
160+
return Json
160161
}
161162
}

0 commit comments

Comments
 (0)