Hi all,
if you want to make a http request (GET or POST) using almofire. you can follow these steps. We can make http request like GET,POST,DELETE,PUT etc. but we use majorly get and post request.
Post request are more secure than get request.
GET Request
Alamofire.request(.GET, "http://www.geognos.com/api/en/countries/info/all.json", parameters: nil)
.response { request, response, data, error in
println(request)
println(response)
println(error)
}
Post Request
Alamofire.request(.POST, "URLString", parameters:["Key":"Value"])
.response { request, response, data, error in
println(request)
println(response)
println(error)
}
1 Comment(s)