0
私は間違っていた場所を見つけることができません。私はすべての可能な解決策を試みましたが、何も動作していないようです。 誰かが私が間違っている場所を提案することはできますか? 私のコードは以下の通りです:Alamofire AFError invalidURL
var diaryEntryUrl = "http://myUrl?uid=10001&diary_text=\(textPrint)&location=\(loactionAddrEnc)"
// var diaryEntryUrl = diaryEntryUrlEncode.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) --- tried encoding, but didn't work
let postParameters:[String: Any] = [ "imagesName": self.awsImageArray2, "tagsList": self.tagArray]
Alamofire.request(diaryEntryUrl, method: .post, parameters: postParameters, encoding: JSONEncoding.default, headers: [:]).responseJSON {
response in
if response.result.isSuccess{
print("SuccessFully Added")
}else{
print("Error \(String(describing: response.result.error))")
}
}
私も文章をコードしているが、それでもエラーがthere.Iは以下のようにそれをやっている試みた:
loactionAddrEnc = loactionAddr.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)
var textPrint = diaryEntryText.text.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)
を私はfollwingエラーを取得しています: