Alamofire发布请求错误

时间:2016-05-03 14:48:41

标签: swift alamofire

我是swift中的新手,我发出了Alamofire POST请求,并且我有相同的消息(FAILURE:Error Domain = com.alamofire.error Code = -6003“响应状态代码是不可接受的:404”UserInfo = {NSLocalizedFailureReason =响应状态代码是不可接受的:404}) 我尝试不同的方式,但同样的结果出现了`

   Alamofire.request(.POST,"http://api.programize.me/2/projects/alraqem/api/v0/book/create",parameters: ["book_name": bookName,"book_specificaton": bookInfo,"book_photo": base64String ,"book_price": bookPrice,"users_user_id":userID,"deals_deal_id": dammyDeal],headers: ["Authorization": "Token kjsfjksabfjkfbvkfkjasfnvjkfnvkvKASDFHJXRESKBkjb"]).validate().responseJSON {
        response in
        switch response.result {
        case .Success:
            self.indicator.hidden = true
          print("i am happy again")

        ////////////////////////////
        case .Failure:
            self.indicator.hidden = true
            print("not")
            debugPrint(response.result)

        }}`

0 个答案:

没有答案