SSL (Secure Socket Layer) and its successor, TLS (Transport Layer Security), provide support for HTTP and other network connections via. This makes it possible to use a different HttpMessageHandler from what is declared in the Project Options dialog. HttpClient client = new HttpClient(new NSUrlSessionHandler()) This will create an HttpClient that explicitly uses NSUrlSessionHandler ![]() HttpClient client = new HttpClient(new CFNetworkHandler()) This will create an HttpClient that explicitly uses the CFNetworkHandler set in the Project Options for the project. In addition to the project-wide configuration shown above, you can also instantiate an HttpClient and inject the desired HttpMessageHandler through the constructor, as demonstrated in these code snippets: // This will use the default message handler for the application as Programmatically setting the HttpMessageHandler It requires more managed code, thus creating a larger app distributable.It typically much slower at things like encryption than the native APIs.It may not be able to connect to secure web servers or cloud services in the future. It is not fully integrated with the Apple OSes and is limited to TLS 1.0. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |