客户端GET请求的时候需要对请求参数进行编码对特殊字符进行转义,做一下记录:
android:
URLEncoder.encode(parametsrString, "UTF-8")
swift5:
parametsrString.addingPercentEncoding(withAllowedCharacters: CharacterSet.init(charactersIn: "#%<>[\\]^`{|}\"]+").inverted)
客户端GET请求的时候需要对请求参数进行编码对特殊字符进行转义,做一下记录:
android:
URLEncoder.encode(parametsrString, "UTF-8")
swift5:
parametsrString.addingPercentEncoding(withAllowedCharacters: CharacterSet.init(charactersIn: "#%<>[\\]^`{|}\"]+").inverted)