title: IOS url request issue
body: <p>I want to send mobile number and password to the server in the ios app. Backend team has given postman API like below image.</p>
  
  <p><strong>Success when sent as form-data</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/ba3IC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ba3IC.png" alt="enter image description here"></a></p>
  
  <p><strong>Below Swift URL request failing, What I'm doing wrong here?</strong> </p>
  
  <pre><code>  func sendReq() {
      let Url                 = String(format: "http://xxxxxxx/mobile/request_otp")
      guard let serviceUrl    = URL(string: Url) else { return }
      let parameterDictionary = ["mobile_number" : "xxxxxxxxxx", "password" : "12345678"]
      var request             = URLRequest(url: serviceUrl)
      request.httpMethod      = "POST"
      request.cachePolicy     = .useProtocolCachePolicy
      request.setValue("application/json", forHTTPHeaderField: "Content-Type")
  
      //  params dict as data
      guard let httpBody = try? JSONSerialization.data(withJSONObject: parameterDictionary, options: []) else {
          return
      }
      request.httpBody        = httpBody
  
      // session
      let session             = URLSession.shared
  
      //data task
      session.dataTask(with: request) { (data, response, error) in
          if let response = response {
              print(response)
          }
          if let data = data {
              do {
                  let json = try JSONSerialization.jsonObject(with: data, options: [])
                  print(json)
              }
              catch {
                  print(error)
              }
          }
          }.resume()
  }
  </code></pre>
  
  <p>But above API call throwing error like</p>
  
  <pre><code>{
      error = TRUE;
      message = "All fields Required!";
  }
  </code></pre>