title: How do I make a POST request with "x-www-form-urlencoded" content in Swift 5 using Alamofire?
body: <p>I'm trying to parse a JSON from a post request but I need to pass the content as x-www-form-urlencoded. I'm using Alamofire and Swift5, the code used to perform the request is this:</p>
  <pre><code>public func performRequest(url: String, parameters: [String:String]){
          AF.request(url, method: .post, parameters: parameters, encoding: URLEncoding.httpBody).validate().responseJSON{ response in
              switch response.result {
              case .success(let JSON): // memorizza il file JSON di risposta in una variabile di nome JSON
                  print(&quot;Validation Successful with response JSON \(JSON)&quot;)
              case .failure(let error):
                  // print(error.localizedDescription)
              print(&quot;Request failed with error \(error)&quot;)
              }
          }
      }
  </code></pre>
  <p>How do I pass the content as x-www-form-urlencoded?</p>