I have parameters in
var Param : [String:String] = [:]
I am using
Alamofire.upload(
multipartFormData: { multipartFormData in
but in response it says invalid service
is their in parameter encoding it goes wrong ?
I have parameters in
var Param : [String:String] = [:]
I am using
Alamofire.upload(
multipartFormData: { multipartFormData in
but in response it says invalid service
is their in parameter encoding it goes wrong ?
The first Answer is for simple post API. If you want to post Multipart data then use the following Method..
Call above method from your class like this.
multipartFormData is used to upload images on server. So if you want to upload image data then try to use below code.
If you want to call the post request then try to use below code:
For swift 3, use the following code. It works very well in all my projects..