I want to send parameter through Alamofire to webservice. I have checked the webservice and it is working properly but it is not accepting parameter just getting response of
Well based from the Alamofire docs if you don't specify HTTPMethod
:
The Alamofire.request method parameter defaults to
.get
.
So judging on that, I think the request being sent there is .get
, thus it has no parameters attached to it.
Change your code to:
Alamofire.request("http://www.webservice.pixcel.com/esp.php", method: .post, parameters: parameters).responseJSON(completionHandler: { (response) in
print(response)
print(response.result)
})