|
@@ -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
|
}
|