简体   繁体   中英

iOS Swift unsupported URL

I have a REST web service running on tomcat at 92.126.230.210:9090/delete(this is a fake ip but the structure is the same) that I want to consume but the compiler output tells to me "unsupported URL".

I have no spaces and all characters are in the ASCII table.

WS call:

//uriParam = 92.126.230.210:9090/delete?uid=SAFAKEWDW
func deleteUserRESTCall(uri uriParam: String){
        URLSession.shared.dataTask(with: URL(string: uriParam)!) { data, response, error in
            if error != nil {
                print(error!.localizedDescription)
            }
            }.resume()
    }

URL缺少协议,例如https://92.126.230.210:9090/delete?uid=SAFAKEWDW

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM