Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 years ago
parent
commit
627f2a5b04
1 changed files with 10 additions and 7 deletions
  1. 10 7
      utils/csbhttp/httpparams.go

+ 10 - 7
utils/csbhttp/httpparams.go View File

@@ -108,20 +108,23 @@ func (hp *HttpParams) AddHeader(key string, value string) *HttpParams {
108 108
 
109 109
 func (hp *HttpParams) SetContentBody(jsonStr string, byteArr []byte) error {
110 110
 
111
-	fmt.Println("JSON22222")
112
-	fmt.Println(jsonStr)
113
-	fmt.Println(byteArr)
114
-	if jsonStr != "" && byteArr != nil {
115
-		errRtn := HttpCallerException{Message: "can not set jsonStr and byteArr parameters together!"}
116
-		return errRtn
117
-	}
111
+	//if jsonStr != "" && byteArr != nil {
112
+	//	fmt.Println("11111112222222")
113
+	//
114
+	//	errRtn := HttpCallerException{Message: "can not set jsonStr and byteArr parameters together!"}
115
+	//	return errRtn
116
+	//}
118 117
 
119 118
 	if jsonStr != "" {
119
+		fmt.Println("333333334444444")
120
+
120 121
 		hp.ct.jsonBody = jsonStr
121 122
 		hp.ct.contentType = JSON
122 123
 	}
123 124
 
124 125
 	if byteArr != nil {
126
+		fmt.Println("5555556666666")
127
+
125 128
 		hp.ct.bytesBody = byteArr //TODO: copy or pointer ?
126 129
 		hp.ct.contentType = BINARY
127 130
 	}