zoukankan      html  css  js  c++  java
  • WKWebView 支持https请求

    - (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler {

        if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {

            

            if ([challenge previousFailureCount] == 0) {

                

                NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];

                

                completionHandler(NSURLSessionAuthChallengeUseCredential, credential);

                

            } else {

                

                completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);

                

            }

            

        } else {

            

            completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);   

            

        }

    }

  • 相关阅读:
    23-10 条件查询
    22-9 聚合函数
    关系抽取snowball
    关系抽取bootstrap
    NER
    GPT
    因果卷积 空洞卷积
    XL-NET
    transoformer-XL
    transoformer
  • 原文地址:https://www.cnblogs.com/nyqmayi/p/7472575.html
Copyright © 2011-2022 走看看