79 @IBAction func touchupInsidePostRequestBtnAction(
_ sender:AnyObject) {
80 let parameters = [
81 “foo”:“bar”,
82 “baz”:[“a”, 1],
83 “qux”:[
84 “x”:1,
85 “y”:2,
86 “z”:3
87 ]
88 ] as [String:Any]
89 Alamofire.request(https://httpbin.org/post,
method:.post, parameters:parameters)
90 .responseJSON { response in
91 print(“original URL request:(response.request)”) //
original URL request
92 print(“URL response:(response.response)”) // URL
response
93 print(“server data:(response.data)”) // server data
94 print(“result of response serialization:
(response.result)”) // result of response serialization
95
96 if let JSON = response.result.value {
97 print(“JSON:(JSON)”)
98 }
99
100 }
101
102 }