2017-11-10 8 views
0

내가이보기 컨트롤러가 실행되지 HTTP 요청 :빠른 4

in get state 
2017-11-09 19:02:30.508053-0500 HeaterControl[7887:2346290] refreshPreferences: HangTracerEnabled: 0 
2017-11-09 19:02:30.508153-0500 HeaterControl[7887:2346290] refreshPreferences: HangTracerDuration: 500 
2017-11-09 19:02:30.508191-0500 HeaterControl[7887:2346290] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0 
2017-11-09 19:02:30.782326-0500 HeaterControl[7887:2346367] [BoringSSL] Function boringssl_context_get_peer_sct_list: line 1754 received sct extension length is less than sct data length 

BoringSSL 경고/오류가 무엇입니까 : 나는 그것을 실행하려고하면

import UIKit 

class ViewController: UIViewController { 

    override func viewDidLoad() { 
     super.viewDidLoad() 

     let button:HeaterButton = HeaterButton(); 
     button.setTitle("LOADING...", for: .normal); 
     self.view.addSubview(button); 

     self.getState(); 
     // Do any additional setup after loading the view, typically from a nib. 
    } 

    override func didReceiveMemoryWarning() { 
     super.didReceiveMemoryWarning() 
     // Dispose of any resources that can be recreated. 
    } 

    //GET STATE OF ESP8266 
    private func getState() { 
     print("in get state"); 
     let url = URL(string: "http://cloud.arest.io/ew1zard"); 
     URLSession.shared.dataTask(with:url!, completionHandler: {(data, response, error) in 
      if error != nil { 
       print(error!.localizedDescription) 
      } 

      guard let data = data else { print("is nil"); return } 
      print(data.description); 
     }).resume() 
    } 
} 

는 콘솔 출력이 있습니다 ? 무슨 일이 일어나고 있는지를 나타내는 지표입니까? 나는 그것을 찾았고 아무 것도 찾을 수 없었다.

답변

0

실수로 약간 잘못된 URL이 사용되었습니다.