title: Request getting timed out when using parameter encoding JSONEncoding.default
body: <p>I am using Alamofire for carrying out all network related requests in my app. I am facing problem while encoding parameter as JSON in get request.</p>
  
  <p>Following in my request:</p>
  
  <pre><code> Alamofire.request(url, method: .get, parameters: params, encoding: JSONEncoding.default)
   .responseJSON(completionHandler: { (response) in
       switch response.result {
       case .success(let retrivedResult):
           print(retrivedResult)
  //         success(brandTags)
           break
       case .failure(let errorGiven):
           print(errorGiven)
           print(String(data: response.data!, encoding: String.Encoding.utf8) ?? "")
           failure(APICaller.parseErrorAndGiveMessage(givenError: errorGiven as NSError))
           break
       }
   })
  </code></pre>
  
  <p>When I encode the parameters as <code>JSONEncoding.default</code> as above, the request always times out with following in my logs:</p>
  
  <pre><code>2016-12-27 12:22:41.425948 xyz[5140:133008] [] nw_endpoint_flow_service_writes [2.1 35.164.98.40:80 ready socket-flow (satisfied)] Write request has 4294967295 frame count, 0 byte count
  2016-12-27 12:23:41.485534 xyz[5140:133041] [] nw_endpoint_flow_service_writes [2.1 35.164.98.40:80 ready socket-flow (satisfied)] Write request has 4294967295 frame count, 0 byte count
  
  Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x60000024a9b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=http://xyz-beta.abc.com/v1/brands/1a1/notifications, NSErrorFailingURLKey=http://xyz-beta.abc.com/v1/brands/1a1/notifications, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}
  2016-12-27 12:23:41.488336 xyz[5140:133868] [] __tcp_connection_write_eof_block_invoke Write close callback received error: [89] Operation canceled
  </code></pre>
  
  <p>But when I remove the parameter encoding like below, the request completes properly without any problem. </p>
  
  <pre><code>Alamofire.request(url, method: .get, parameters: params, encoding: JSONEncoding.default)
       .responseJSON(completionHandler: { (response) in
           switch response.result {
           case .success(let retrivedResult):
               print(retrivedResult)
      //         success(brandTags)
               break
           case .failure(let errorGiven):
               print(errorGiven)
               print(String(data: response.data!, encoding: String.Encoding.utf8) ?? "")
               failure(APICaller.parseErrorAndGiveMessage(givenError: errorGiven as NSError))
               break
           }
       })
  </code></pre>
  
  <p>What is the making the difference?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I opened this issue with Alamofire community on Github and <a href="https://github.com/Alamofire/Alamofire/issues/1879#issuecomment-269573257" rel="nofollow noreferrer">this is their response</a>. Hope this helps people who faced similar issue.</p>