Answers for "how to use x-www-form-urlencoded in swift"

0

swift alamofire x-www-form-urlencoded

let param:Parameters=[
        "param":param]
   let headers:HTTPHeaders=[
        "Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"]
    
    Alamofire.request(url,method: .post,parameters: param,encoding: URLEncoding.httpBody, headers: headers).responseJSON{response in
....
 }
Posted by: Guest on July-21-2021
0

swift alamofire x-www-form-urlencoded

let headers = [
    "Content-Type": "application/x-www-form-urlencoded"
]
let parameters = [
    "myParameter": "value"
]
let url = NSURL(string: "https://something.com")!
Alamofire.request(.POST, url, parameters: parameters, headers: headers, encoding: .URLEncodedInURL).response { request, response, data, error in
    print(request)
    print(response)
    print(data)
    print(error)
}
Posted by: Guest on July-21-2021

Code answers related to "how to use x-www-form-urlencoded in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language