Tôi muốn đặt cookie trong yêu cầu HTTP POST của mình.Swift 2.0, Alamofire: Đặt cookie trong Yêu cầu bài đăng HTTP
Something như lĩnh vực cookie trong Yêu cầu HTTP dưới đây,
version: 0.1.7
Cookie: client=Android; version=0.1.7; sellerId=SEL5483318784; key=178a0506-0639-4659-9495-67e5dffa42de
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 1431
Làm thế nào tôi có thể đạt được điều này với Alamofire?
yêu cầu Alamofire hiện tại của tôi là như thế này,
Alamofire.request(.POST, ServerConfig.ADD_PRODUCT_URL, parameters: productJSON, encoding: .JSON, headers: nil)
.responseJSON(completionHandler: { responseRequest, responseResponse, responseResult in
print(responseRequest!.URL)
print(responseResponse)
print(responseResult)
})