File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ func (d *Yun139) refreshToken() error {
6464 splits := strings .Split (decodeStr , ":" )
6565 reqBody := "<root><token>" + splits [2 ] + "</token><account>" + splits [1 ] + "</account><clienttype>656</clienttype></root>"
6666 _ , err = base .RestyClient .R ().
67- // ForceContentType("application/json ").
67+ ForceContentType ("application/xml " ).
6868 SetBody (reqBody ).
6969 SetResult (& resp ).
7070 Post (url )
@@ -74,7 +74,7 @@ func (d *Yun139) refreshToken() error {
7474 if resp .Return != "0" {
7575 return fmt .Errorf ("failed to refresh token: %s" , resp .Desc )
7676 }
77- d .Authorization = base64 .StdEncoding .EncodeToString ([]byte (splits [0 ] + splits [1 ] + ":" + resp .Token ))
77+ d .Authorization = base64 .StdEncoding .EncodeToString ([]byte (splits [0 ] + ":" + splits [1 ] + ":" + resp .Token ))
7878 op .MustSaveDriverStorage (d )
7979 return nil
8080}
You can’t perform that action at this time.
0 commit comments