title: Alamofire 5 (Beta 6): Parameters of PUT Request do not arrive in Flask-Restful
body: <p><strong>UPDATE</strong>
  For me the Problem got fixed as soon as I was putting "encoding: URLEncoding(destination: .queryString)" in my request. Maybe this helps somebody else. <a href="https://stackoverflow.com/questions/43282281/how-to-add-alamofire-url-parameters">link</a>  </p>
  
  <p>I struggled the whole day to find the problem in my Alamofire PUT Request or the Flask Restful API. Request like GET, DELETE and POST are working fine with <strong>Alamofire</strong>, <strong>except the PUT Request.</strong> 
  When I'm using PUT Requests in combination with <strong>Postman</strong> and <strong>Flask-Restful</strong> everything is also working fine. But as soon as I'm trying to achieve the same Result with <strong>Alamofire</strong>, I'm not getting any parameters in Flask. I tried to illustrate this in the code examples.</p>
  
  <p>So in short my example illustrates the following:</p>
  
  <p><strong>DELETE Request</strong>(Same with GET and POST)</p>
  
  <p>Postman: success</p>
  
  <p>Alamofire: success</p>
  
  <p><strong>PUT Request</strong></p>
  
  <p>Postman: success</p>
  
  <p>Alamofire: failure (parameter dictionary empty in Flask-Restful)</p>
  
  <p>Here is my Python Code [API Server]:</p>
  
  <pre><code>from flask import Flask, request, jsonify
  from flask_restful import Resource, Api, reqparse
  
  
  app = Flask(__name__)
  api = Api(app)
  class Stackoverflow(Resource):
      def delete(self):
          print(request.args)
          if request.args.get('test-key') is None:
              return jsonify({"message": "failure"})
          else:
              return jsonify({"message": "success"})
  
      def put(self):
          print(request.args)
          if request.args.get('test-key') is None:
              return jsonify({"message": "failure"})
          else:
              return jsonify({"message": "success"})
  
  api.add_resource(Stackoverflow, '/stackoverflow')
  if __name__ == '__main__':
      app.run(debug=True, host='0.0.0.0')
  </code></pre>
  
  <p>If I'm using Postman, I get this result (like expected):
  <a href="https://i.stack.imgur.com/0wfAG.png" rel="nofollow noreferrer">Result in Postman</a></p>
  
  <p>But now I'm trying to do the same with Alamofire in Swift. Same Server, nothing changed. </p>
  
  <p>SWIFT demo Code [IOS APP]:</p>
  
  <pre><code>import UIKit
  import Alamofire
  import SwiftyJSON
  
  class ViewController: UIViewController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view
          simplePUTRequest()
          simpleDELETERequest()
  
  }
  
      func simplePUTRequest(){
  
          AF.request("http://localhost:5000/stackoverflow", method: .put, parameters: ["test-key":"testvalue"])
              .validate(statusCode: 200..&lt;300)
              .responseJSON { response in
  
                  if let data = response.data {
  
                      print("Result PUT Request:")
                      print(String(data: data, encoding: .utf8)!)
                      //print(utf8Text)
                  }else{
  
                  }
      }
      }
  
      func simpleDELETERequest(){
  
          AF.request("http://localhost:5000/stackoverflow", method: .delete, parameters: ["test-key":"testvalue"])
              .validate(statusCode: 200..&lt;300)
              .responseJSON { response in
  
                  if let data = response.data {
  
                      print("Result DELETE Request:")
                      print(String(data: data, encoding: .utf8)!)
                      //print(utf8Text)
                  }else{
  
                  }
          }
      }
  </code></pre>
  
  <p>Xcode Console:</p>
  
  <pre><code>Result PUT Request:
  {
    "message": "failure"
  }
  
  Result DELETE Request:
  {
    "message": "success"
  }
  </code></pre>
  
  <p>python Console (both Alamofire Requests):</p>
  
  <pre><code>ImmutableMultiDict([])
  127.0.0.1 - - [15/Jun/2019 21:17:31] "PUT /stackoverflow HTTP/1.1" 200 -
  ImmutableMultiDict([('test-key', 'testvalue')])
  127.0.0.1 - - [15/Jun/2019 21:17:31] "DELETE /stackoverflow?test-key=testvalue HTTP/1.1" 200 -
  </code></pre>
  
  <p>As you can see, I'm getting the success message only while using the DELETE method. 
  Till now I tried using different encodings like URLEncoding.httpbody and URLEncoding.default, but nothing really helped. 
  For me it seems like it's a Alamofire/Swift Problem, because in Postman the same request method is working fine. 
  I would really appreciate your help, because I'm stuck and don't know anything further to do. I hope I didn't misunderstood something essential. 
  Thank you in advance!</p>