title: how to use form data in Alamofire
body: <p>In the postman in the body section in the form-data part when I pass a mobile number as a key and mobile number as Int value I get a response. But when I did it in the code I will not get the response as expected.</p>
  <p>my code is</p>
  <pre><code> func fetchRegisterData(){
  
            let url = registerApi
       
      var mobileNumber = mobilenumberTextfield.text
      
      let parameters = [&quot;mobile&quot; : mobileNumber] as [String : Any]
      
       AF.request(url,method: .post, parameters: parameters, encoding:JSONEncoding.default).responseJSON
                { response in switch response.result {
                case .success(let JSON):
                    print(&quot;response is :\(response)&quot;)
              
                case .failure(_):
                    print(&quot;fail&quot;)
                    }
            }
            
        }
  </code></pre>