- A simple httpDNS framework, support http and https, but not SNI currently.
- High availability, request DNS info asynchronously, abandon overdue or unusable DNS Cache automatically, change DNS cache as network changed.
- Provide GoogleDNS service default, add other custom DNS service easily as well.
As a CocoaPod
Just add this to your Podfile
pod 'WRHttpDNS'
Download all files under WRHttpDNS
directory.
Support NSURLSession and NSURLConnection,call the method before a real request.
[[WRHttpDNSManager shareInstance] useHttpDNSWithRequest:request];
If network responsed an error, you should check the error.
[[WRHttpDNSManager shareInstance] checkHttpDNSError:error domain:domain]
As https connection, you should implement some delegate like WRURLSessionDelegate
or WRURLConnecitonDelegate
.
WRHttpDNS is released under the MIT license. See LICENSE for details.