Call to mind a problem encountered API

Call sonar API interface to the following address:

http://sonar.*****.com/api/measures/search_history?component=tcmp-devops-service&metrics=sqale_index%2Cduplicated_lines_density%2Cncloc%2Ccoverage%2Cbugs%2Ccode_smells%2Cvulnerabilities&ps=1000

Garbled symbols appear on the url, do not know what does it mean garbled, are summarized as follows correspondence between:

Character - URL encoded values

Space - 20%

" - %22

# - %23

% - %25

& - %26

( - %28

) - %29

+ - 2B%

, - %2C

/ -% 2F

: -% 3A

; -% 3B

< - %3C

= -% 3D

> - %3E

? -% 3F

@ - %40

- %5C

| -% 7C

URL escaping special characters, the special meaning of some characters in the URL, the basic encoding rules are as follows:

1, into space plus sign (+)

2, the forward slash (/) to separate directories and subdirectories

3, question mark (?) Separate URL and query

4, the percent sign (%) to develop special characters

5, # number specified bookmark

6, & delimited parameters

For Url deal with the problem of containing Chinese, different browsers have different performance. For example, IE, if you check the Advanced Settings "Always send Url to UTF-8", then the path portion of the Url in Chinese will be sent to the server after using UTF-8 encoding performed Url, and the query parameters in Chinese part of system default character set encoding Url. In order to ensure maximum interoperability, it is recommended that all components into Url of all explicitly specify a character set encoding Url without relying on the browser's default implementation.

Guess you like

Origin www.cnblogs.com/mengtaoadmin/p/11184053.html