@@ -5,7 +5,7 @@ use nyquest_interface::client::{CachingBehavior, ClientOptions, ProxyOptions};
55use nyquest_interface:: { Body , Error as NyquestError , Method , Request , Result as NyquestResult } ;
66use objc2:: rc:: Retained ;
77use objc2:: runtime:: ProtocolObject ;
8- use objc2:: { AllocAnyThread , Message } ;
8+ use objc2:: AllocAnyThread ;
99use objc2_foundation:: {
1010 ns_string, NSCharacterSet , NSData , NSDictionary , NSMutableCharacterSet , NSMutableDictionary ,
1111 NSMutableURLRequest , NSNumber , NSString , NSTimeInterval , NSURLComponents ,
@@ -48,13 +48,17 @@ impl NSUrlSessionClient {
4848 ns_string ! ( "HTTPProxy" ) ,
4949 ns_string ! ( "HTTPPort" ) ,
5050 ] ,
51- & [ ns_string ! ( "1" ) . retain ( ) , http_proxy. 0 , http_proxy. 1 ] ,
51+ & [
52+ NSNumber :: new_i32 ( 1 ) . into_super ( ) . into_super ( ) ,
53+ http_proxy. 0 . into_super ( ) ,
54+ http_proxy. 1 . into_super ( ) ,
55+ ] ,
5256 ) ;
5357
5458 if let Some ( https_proxy) =
5559 proxy_url_for_https. and_then ( |url| parse_proxy_host_port ( & url) )
5660 {
57- dict. insert ( ns_string ! ( "HTTPSEnable" ) , & ns_string ! ( "1" ) . retain ( ) ) ;
61+ dict. insert ( ns_string ! ( "HTTPSEnable" ) , & NSNumber :: new_i32 ( 1 ) ) ;
5862 dict. insert ( ns_string ! ( "HTTPSProxy" ) , & https_proxy. 0 ) ;
5963 dict. insert ( ns_string ! ( "HTTPSPort" ) , & https_proxy. 1 ) ;
6064 }
0 commit comments