github编辑

uri字符常量URIComponents

uri中使用的字符常量.

1 优点

  1. 代码可读性更高

  2. 可以有效的避免由于手误带来的不必要的错误

2.内置值

常量
说明

URIComponents.FRAGMENT

查询片段

#

URIComponents.QUESTIONMARK

The question mark is used as a separator and is not part of the query string

?

URIComponents.AMPERSAND

The Constant ampersand

&

URIComponents.SCHEME_HTTP

http协议

http

URIComponents.SCHEME_HTTPS

https协议

https

最后更新于

这有帮助吗?