Swift 2.0, Alamofire: das Setzen von cookies in HTTP-Post-Request

Möchte ich das setzen von cookies in HTTP-POST-Anfrage.

Etwas wie die cookie-Feld im HTTP-Request unter,

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

Wie kann ich erreichen, das mit Alamofire?

Meine aktuelle Alamofire Anfrage ist wie diese,

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)
     })
Schreibe einen Kommentar