|
@@ -21,6 +21,12 @@ func NewMmmBusinessAdminServiceGateway() *MmmBusinessAdminServiceGateway { |
|
@@ -21,6 +21,12 @@ func NewMmmBusinessAdminServiceGateway() *MmmBusinessAdminServiceGateway { |
21
|
baseURL: constant.BUSINESS_ADMIN_HOST,
|
21
|
baseURL: constant.BUSINESS_ADMIN_HOST,
|
22
|
}
|
22
|
}
|
23
|
}
|
23
|
}
|
|
|
24
|
+func (client MmmBusinessAdminServiceGateway) buildHeader() http.Header {
|
|
|
25
|
+ var h = http.Header{}
|
|
|
26
|
+ h.Set("Content-Type", "application/json")
|
|
|
27
|
+ h.Set("Accept", "application/json")
|
|
|
28
|
+ return h
|
|
|
29
|
+}
|
24
|
|
30
|
|
25
|
type ResponseGetUserAuth struct {
|
31
|
type ResponseGetUserAuth struct {
|
26
|
UCenterCommonMsg
|
32
|
UCenterCommonMsg
|
|
@@ -41,6 +47,7 @@ func (gateway MmmBusinessAdminServiceGateway) httpDo(reqURL string, mathod strin |
|
@@ -41,6 +47,7 @@ func (gateway MmmBusinessAdminServiceGateway) httpDo(reqURL string, mathod strin |
41
|
logs.Info("====>Send To URL:%s", reqURL)
|
47
|
logs.Info("====>Send To URL:%s", reqURL)
|
42
|
logs.Info("====>Send To BusinessAdmin:%s", bt.String())
|
48
|
logs.Info("====>Send To BusinessAdmin:%s", bt.String())
|
43
|
req, err := http.NewRequest(mathod, reqURL, bt)
|
49
|
req, err := http.NewRequest(mathod, reqURL, bt)
|
|
|
50
|
+ req.Header = gateway.buildHeader()
|
44
|
if err != nil {
|
51
|
if err != nil {
|
45
|
return nil, err
|
52
|
return nil, err
|
46
|
}
|
53
|
}
|