@@ -162,7 +162,7 @@ func (s *ObjectService) GetPresignedURL(ctx context.Context, httpMethod, name, a
162162 }
163163 }
164164 }
165- req , err := s .client .newRequest (ctx , sendOpt . baseURL , sendOpt . uri , sendOpt . method , sendOpt . body , sendOpt . optQuery , sendOpt . optHeader , false )
165+ req , err := s .client .newPresignedRequest (ctx , & sendOpt )
166166 if err != nil {
167167 return nil , err
168168 }
@@ -243,7 +243,7 @@ func (s *ObjectService) GetPresignedURL2(ctx context.Context, httpMethod, name s
243243 sendOpt .uri = fmt .Sprintf ("%s%s%s" , sendOpt .uri , mark , url.Values {"x-cos-security-token" : []string {cred .SessionToken }}.Encode ())
244244 }
245245
246- req , err := s .client .newRequest (ctx , sendOpt . baseURL , sendOpt . uri , sendOpt . method , sendOpt . body , sendOpt . optQuery , sendOpt . optHeader , false )
246+ req , err := s .client .newPresignedRequest (ctx , & sendOpt )
247247 if err != nil {
248248 return nil , err
249249 }
@@ -329,7 +329,7 @@ func (s *ObjectService) GetPresignedURL3(ctx context.Context, httpMethod, name s
329329 sendOpt .uri = fmt .Sprintf ("%s%s%s" , sendOpt .uri , mark , url.Values {"x-cos-security-token" : []string {cred .SessionToken }}.Encode ())
330330 }
331331
332- req , err := s .client .newRequest (ctx , sendOpt . baseURL , sendOpt . uri , sendOpt . method , sendOpt . body , sendOpt . optQuery , sendOpt . optHeader , false )
332+ req , err := s .client .newPresignedRequest (ctx , & sendOpt )
333333 if err != nil {
334334 return nil , err
335335 }
@@ -382,7 +382,7 @@ func (s *ObjectService) GetSignature(ctx context.Context, httpMethod, name, ak,
382382 sendOpt .uri = fmt .Sprintf ("%s?%s" , sendOpt .uri , qs )
383383 }
384384 }
385- req , err := s .client .newRequest (ctx , sendOpt . baseURL , sendOpt . uri , sendOpt . method , sendOpt . body , sendOpt . optQuery , sendOpt . optHeader , false )
385+ req , err := s .client .newPresignedRequest (ctx , & sendOpt )
386386 if err != nil {
387387 return ""
388388 }
0 commit comments