title: (Error Domain=NSPOSIXErrorDomain Code=100 "Protocol error"
body: <p>I am using Alamofire, using with HTTP cause no problem but I got below when I changed protocol HTTP to HTTPS</p>
  
  <blockquote>
    <p>Error Domain=NSPOSIXErrorDomain Code=100 "Protocol error" 
    UserInfo={NSErrorPeerAddressKey={length = 16, capacity = 16, bytes =
    0x100201bb5d5efc420000000000000000}, _kCFStreamErrorCodeKey=100,
    _kCFStreamErrorDomainKey=1})</p>
  </blockquote>
  
  <p><strong>Cod I have tried:</strong></p>
  
  <pre><code>public init(){}
  static let shared = HTTPRequest()
  
  func Service(method:String,path:String,
               parameters:[String:String]? = nil,
               requestObj:Any? = nil,
               actionListener:ActionListener){
  
      actionListener.start()
      var _url = URLComponents(string: BaseURL + path)
  
      if parameters != nil{
          var queryItems = [URLQueryItem]()
          for parameter in parameters!{
              let queryItem = URLQueryItem(name: parameter.key, value: parameter.value)
              queryItems.append(queryItem)
          }
          _url?.queryItems = queryItems
      }
      var request = URLRequest(url: (_url?.url)!)
  
      request.httpMethod = method
      request.setValue("application/json", forHTTPHeaderField: "Content-Type")
      if MobileConstants.AccessToken != nil{
           request.setValue(MobileConstants.AccessToken, forHTTPHeaderField:"Authorization")
          request.setValue(MobileConstants.LoginResponse.user.userName, forHTTPHeaderField: "UserName")
      }
      request.setValue("iOS", forHTTPHeaderField: "ClientToken")
      request.setValue("en-US", forHTTPHeaderField: "Language")
      if(requestObj != nil){
      let json = JSONSerializer.toJson(requestObj!)
      request.httpBody = json.data(using: .utf8)
      }
  
      Alamofire.request(request).responseJSON {
          response in
          if(response.result.isSuccess){
              actionListener.success(from: path, data: response.result.value!)
          }else{
              actionListener.fail()
              print(response.error)
              print(response.result.error)
          }
      }
  }
  </code></pre>