@@ -7,11 +7,12 @@ use crate::{
7
7
AccountSharedAccessSignatureBuilder , ClientAccountSharedAccessSignature ,
8
8
} ,
9
9
} ;
10
- use azure_core:: auth:: TokenCredential ;
11
- use azure_core:: error:: { Error , ErrorKind , ResultExt } ;
12
- use azure_core:: { headers, Request } ;
13
- use azure_core:: { headers:: * , Pipeline } ;
14
- use azure_core:: { ClientOptions , HttpClient } ;
10
+ use azure_core:: {
11
+ auth:: TokenCredential ,
12
+ error:: { Error , ErrorKind , ResultExt } ,
13
+ headers:: * ,
14
+ ClientOptions , Context , HttpClient , Pipeline , Request , Response ,
15
+ } ;
15
16
use bytes:: Bytes ;
16
17
use http:: method:: Method ;
17
18
use std:: sync:: Arc ;
@@ -446,8 +447,8 @@ impl StorageAccountClient {
446
447
None => request. insert_header ( CONTENT_LENGTH , "0" ) ,
447
448
} ;
448
449
449
- request. insert_header ( headers :: MS_DATE , time) ;
450
- request. insert_header ( headers :: VERSION , AZURE_VERSION ) ;
450
+ request. insert_header ( MS_DATE , time) ;
451
+ request. insert_header ( VERSION , AZURE_VERSION ) ;
451
452
452
453
// We sign the request only if it is not already signed (with the signature of an
453
454
// SAS token for example)
@@ -496,6 +497,17 @@ impl StorageAccountClient {
496
497
& self . pipeline
497
498
}
498
499
500
+ pub async fn send (
501
+ & self ,
502
+ context : & mut Context ,
503
+ request : & mut Request ,
504
+ service_type : ServiceType ,
505
+ ) -> azure_core:: Result < Response > {
506
+ self . pipeline
507
+ . send ( context. insert ( service_type) , request)
508
+ . await
509
+ }
510
+
499
511
/// Prepares' an `azure_core::Request`.
500
512
pub ( crate ) fn blob_storage_request ( & self , http_method : http:: Method ) -> Request {
501
513
Request :: new ( self . blob_storage_url ( ) . clone ( ) , http_method)
0 commit comments