@@ -3,13 +3,9 @@ use std::pin::Pin;
33
44use did:: rpc:: request:: RpcRequest ;
55use did:: rpc:: response:: RpcResponse ;
6- use ic_exports:: ic_cdk;
76use ic_exports:: ic_cdk:: management_canister:: {
87 self , HttpHeader , HttpMethod , HttpRequestArgs , TransformContext ,
98} ;
10- #[ cfg( feature = "sanitize-http-outcall" ) ]
11- use ic_exports:: ic_cdk:: management_canister:: { HttpRequestResult , TransformArgs } ;
12-
139use crate :: { Client , JsonRpcError , JsonRpcResult } ;
1410
1511/// EVM client that uses HTTPS Outcalls to communicate with EVM.
@@ -95,10 +91,9 @@ impl HttpOutcallClient {
9591}
9692
9793#[ cfg( feature = "sanitize-http-outcall" ) ]
98- #[ ic_cdk:: query]
99- fn sanitize_http_response ( raw_response : TransformArgs ) -> HttpRequestResult {
94+ fn sanitize_http_response ( raw_response : ic_exports:: ic_cdk:: management_canister:: TransformArgs ) -> ic_exports:: ic_cdk:: management_canister:: HttpRequestResult {
10095 const USE_HEADERS : & [ & str ] = & [ "content-encoding" , "content-length" , "content-type" , "host" ] ;
101- let TransformArgs { mut response, .. } = raw_response;
96+ let ic_exports :: ic_cdk :: management_canister :: TransformArgs { mut response, .. } = raw_response;
10297 response
10398 . headers
10499 . retain ( |header| USE_HEADERS . iter ( ) . any ( |v| v == & header. name . to_lowercase ( ) ) ) ;
@@ -179,6 +174,7 @@ impl Client for HttpOutcallClient {
179174#[ cfg( feature = "sanitize-http-outcall" ) ]
180175mod tests {
181176 use candid:: Nat ;
177+ use ic_exports:: ic_cdk:: management_canister:: { HttpRequestResult , TransformArgs } ;
182178
183179 use super :: * ;
184180
0 commit comments