第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

“ JSON文本不是以數(shù)組或?qū)ο箝_頭,并且沒有允許設(shè)置片段的選項(xiàng)。”

“ JSON文本不是以數(shù)組或?qū)ο箝_頭,并且沒有允許設(shè)置片段的選項(xiàng)。”

PHP
桃花長(zhǎng)相依 2021-05-05 17:25:09
發(fā)出POST請(qǐng)求時(shí),Xcode調(diào)試器顯示錯(cuò)誤錯(cuò)誤域= NSCocoaErrorDomain代碼= 3840“ JSON文本不是以數(shù)組或?qū)ο箝_頭,并且沒有允許設(shè)置片段的選項(xiàng)?!?UserInfo = {NSDebugDescription = JSON文本不是以數(shù)組或?qū)ο箝_頭,并且未設(shè)置允許片段的選項(xiàng)。}這是POST函數(shù), func startArchive() {        let app_Id = (appId.base64Decoded()!)        let job_Id = (jobId.base64Decoded()!)        var response_ = 0        guard let url = URL(string: "https://xxx.yyyy.com/question/abc") else {return}        let request = NSMutableURLRequest(url:url)        request.httpMethod = "POST"        let postString = "session_id=\(pSessionId)&job_id=\(job_Id)&app_id=\(app_Id)&action=start"        print(postString)        request.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type")        request.httpBody = postString.data(using: String.Encoding.utf8)        let task = URLSession.shared.dataTask(with: request as URLRequest) { data, response, error in            guard error == nil && data != nil else {                                                          // check for fundamental networking error                print("error=\(String(describing: error))")                return            }            do {                if let responseJSON = try JSONSerialization.jsonObject(with: data!) as? [String:AnyObject]{                    print(responseJSON)                    print(responseJSON["status"]!)                                       response_ = responseJSON["status"]! as! Int                                        print(response_)                    //Check response from the sever                    if response_ == 200                    {                        OperationQueue.main.addOperation {                            print("Login Successful")                        }                                            }                        
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 266 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)