title: Record audio and send it to server in Swift 3
body: <p>I have recorded audio with iOS successfully, but the problem is that I cannot send audio to server. Code that I tried is as shown below.</p>
  
  <pre><code>    let audioData : NSData =  try Data(contentsOf: (audioRecorder?.url)!) as NSData
  
      var finalurl = url+Access_Token!
  
      let params = [
          "name":"iosTest.mp3",
          "file": audioData] as [String : Any]
  
      let manager = Alamofire.SessionManager.default
      manager.session.configuration.timeoutIntervalForRequest = 30000
  
      manager.request(finalurl, method: .post, parameters: params).responseJSON {
          response in
  
          stopActivityIndicator()
  
          if let result = response.result.value {
              let JSON = result as! NSDictionary
              print(JSON)
              let ResponseSuccess = JSON.object(forKey: "response")!
              displayAlertMessage(userMessage: ResponseSuccess as! String, myView: self)
          }
      }
  } catch let error as NSError {
      print("audioPlayer error: \(error.localizedDescription)")
  
      displayAlertMessage(userMessage: "Something error Occured! Please try again" as! String, myView: self)
  }
  </code></pre>