File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -89,19 +89,27 @@ pub struct FastlyClient {
8989}
9090
9191impl ClientLike for FastlyClient {
92- fn new ( headers : HeaderMap , timeout : std:: time:: Duration ) -> Self {
92+ fn new ( headers : HeaderMap , _timeout : std:: time:: Duration ) -> Self {
9393 Self {
9494 default_headers : headers,
9595 }
9696 }
9797
9898 fn request ( & self , method : super :: client:: Method , url : String ) -> impl ClientRequestBuilder {
99+ let mut req = http:: Request :: new (
100+ <flagsmith:: client:: client:: Method as Into < http:: Method > >:: into ( method) ,
101+ url,
102+ ) ;
103+
104+ for ( name, value) in & self . default_headers {
105+ if let Ok ( header_val) = value. to_str ( ) {
106+ req. append_header ( name. to_string ( ) , header_val) ;
107+ }
108+ }
109+
99110 FastlyRequestBuilder {
100111 backend : "flagsmith" . to_string ( ) ,
101- request : Ok ( http:: Request :: new (
102- <flagsmith:: client:: client:: Method as Into < http:: Method > >:: into ( method) ,
103- url,
104- ) ) ,
112+ request : Ok ( req) ,
105113 }
106114 }
107115}
You can’t perform that action at this time.
0 commit comments