title: Send Array of Request Body in an Alamofire Request
body: <p>I have to send an array of request body and following is the request body that i have to send</p>
  
  <pre><code>[{
     "user": "abc",
     "id": "demo"
  }]
  </code></pre>
  
  <p><strong>What i've tried?</strong></p>
  
  <pre><code>var requestArray = [[String: String]]()
  let params = [
              "user": "abc",
              "id": "demo"
          ]
  requestArray.append(params)
  
  var request = URLRequest(url: URL.init(string: myUrl)!)
  request.httpMethod = ".post"
  request.setValue("application/json", forHTTPHeaderField: "Content-Type")
  request.httpBody = try! JSONSerialization.data(withJSONObject: requestArray)
  
  Alamofire.request(request)
           .response{ 
               response in
               print("Request Body:- \(response.request)")
               print(response)
  }
  </code></pre>
  
  <p><strong>Problems that i am facing</strong></p>
  
  <p>URL works flawlessly in both Postman and an Android App</p>
  
  <p>Above solution is not working for me. My web service returns me <code>400 error code (Bad Request)</code></p>
  
  <p>I am new to iOS development so any help will be appreciated.</p>