title: Alamofire: Is there a way to get response data in case of Failure?
body: <p>In <code>Alamofire</code> calling <code>.validate()</code> does automatic validation and passes status code <code>200...299</code> as success. </p>
  
  <p>In case of failed API request server sends status code <code>400</code> and some internal error message and code in JSON to identify which kind of error is this. I couldn't find a way to get this JSON data in case status code is <code>400</code> under <code>case .Failure</code> in following example:</p>
  
  <pre><code>Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"])
           .validate()
           .responseJSON { response in
               switch response.result {
               case .Success:
                   print("Validation Successful")
               case .Failure(let error):
                   print(error)
               }
           }
  </code></pre>
  
  <p><code>error</code> doesn't contain response data. Is there anyway to get it?</p>