Browse Source

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

csx 3 years ago
parent
commit
1382a12598
3 changed files with 7 additions and 1 deletions
  1. 1 1
      service/jsyb_service.go
  2. 2 0
      utils/csbhttp/httpcaller.go
  3. 4 0
      utils/csbhttp/httpparams.go

+ 1 - 1
service/jsyb_service.go View File

@@ -65,7 +65,7 @@ func Jsyb1101(certNo string, org_name string, doctor string, fixmedins_code stri
65 65
 func HttpRequest(url string, ak string, sk string, timestamp int64, requestByte []byte, json string) string {
66 66
 	fmt.Println(url)
67 67
 	//step 1. 设置请求参数
68
-	csbHP := csbhttp.NewHttpParams("http://10.72.3.83:8086/CSB?name='111111'") //设置请求地址及url参数
68
+	csbHP := csbhttp.NewHttpParams("http://10.72.3.83:8086/CSB") //设置请求地址及url参数
69 69
 	//设置调用方式 get 或者 post
70 70
 	csbHP.SetMethod("post")
71 71
 	//csbHP.AddParam("input", "")

+ 2 - 0
utils/csbhttp/httpcaller.go View File

@@ -167,6 +167,8 @@ func signParams(params map[string]string, api string, version string, ak string,
167 167
 func Invoke(params HttpParams) (str string, rtnHeaders map[string][]string, hcError *HttpCallerException) {
168 168
 	//init rtnHeaders
169 169
 	rtnHeaders = make(map[string][]string)
170
+	fmt.Println("~~~~~~")
171
+	fmt.Println(params)
170 172
 
171 173
 	hcError = params.Validate()
172 174
 	if hcError != nil {

+ 4 - 0
utils/csbhttp/httpparams.go View File

@@ -121,6 +121,10 @@ func (hp *HttpParams) SetContentBody(jsonStr string, byteArr []byte) error {
121 121
 		hp.ct.bytesBody = byteArr //TODO: copy or pointer ?
122 122
 		hp.ct.contentType = BINARY
123 123
 	}
124
+	fmt.Println("------")
125
+	fmt.Println(hp.ct.jsonBody)
126
+	fmt.Println(hp.ct.bytesBody)
127
+	fmt.Println("------")
124 128
 
125 129
 	return nil
126 130
 }