Skip to content

Add Form-data support

Compare
Choose a tag to compare
@rogermolas rogermolas released this 13 Jan 07:10

Add form-data fields from params

RMRequest(urlString, method: .POST(.FomDataEncoding), parameters: params, hearders: nil)

Custom form data request

 let request = RMRequest(url: URL(string: urlString)!)
 request.setHttp(method: .POST(.FomDataEncoding))
 request.setFormData(fields: params)

or

 request.setHttpBody(data: customDataBody)