地址栏传参带空格连接不起怎么办?
空格使用%20代替空格即可!
url地址栏解析%20为空格,和转义字符一样的意思。
案例:传参为日期时
错误示范:
url = "https://demo-open.XXXX.cc/api/emr/updateTime/list?clinicCode=smzy101&lastUpdateTimeFrom=2020-10-29 16:59:55&lastUpdateTimeTo=2021-11-29 16:59:55";
正确示范:
url = "https://demo-open.XXXX.cc/api/emr/updateTime/list?clinicCode=smzy101&lastUpdateTimeFrom=2020-10-29%2016:59:55&lastUpdateTimeTo=2021-11-29%2016:59:55";