title: Alamofire4 trouble with JSONResponseSerializer & HTTPURLResponse Swift 3.0
body: <p>Since I updated Alamofire I get the errors: <strong>Type Request has no member JSONResponseSerializer</strong> and <strong>cannot call value of non-function type HTTPURLResponse</strong></p>
  
  <p>I have already switched Response to DataResponse but I still get the error.</p>
  
  <p><a href="https://i.stack.imgur.com/Wvi7W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wvi7W.png" alt="enter image description here"></a></p>
  
  <p>Code:</p>
  
  <pre><code>extension Alamofire.Request {
      func responseUserEventsArray(_ completionHandler: @escaping (DataResponse&lt;UserEventsWrapper&gt;) -&gt; Void) -&gt; Self {
          let responseSerializer = DataResponseSerializer&lt;UserEventsWrapper&gt; { request, response, data, error in
              guard error == nil else
              {
                  return .failure(error!)
              }
              guard let responseData = data else {
                  return .failure(AFError.responseSerializationFailed(reason: .inputDataNil))
  
              }
  
              let JSONResponseSerializer = Request.JSONResponseSerializer(options: .allowFragments)
              let result = JSONResponseSerializer.serializeResponse(request, response, responseData, error)
  
              switch result {
              case .Success(let value):
                  let json = JSON(value)
                  let wrapper = UserEventsWrapper()
  
                  wrapper.next = json["eventhistory"]["next_page_url"].stringValue
                  wrapper.previous = json["eventhistory"]["prev_page_url"].stringValue
                  wrapper.count = json["eventhistory"]["total"].intValue
  
                  var allUserEvents:Array = Array&lt;UserEvents&gt;()
                  print(json)
                  let results = json["eventhistory"]["data"]
                  print(results)
  
                  for jsonAds in results
                  {
                      print(jsonAds.1)
                      let adsData = UserEvents(json: jsonAds.1, id: Int(jsonAds.0))
                      allUserEvents.append(adsData)
                  }
                  wrapper.usereventsitems = allUserEvents
                  return .success(wrapper)
              case .Failure(let error):
                  return .Failure(error)
              }
          }
  
          return response(responseSerializer: responseSerializer,completionHandler: completionHandler)
      }
  }
  </code></pre>