HTTP parameter special character handling

The problem description provides an http query interface, in which the content parameter is still a url address and contains special characters. The content parameter needs to be specially processed:
the parameter before processing is
content=news_weixingzh|http://mp.weixin.qq.com/s?__biz=MzI2ODAwNDYzMQ == & mid = 2690713706 & idx = 3 & sn = b180bcdc1d7a7de3315dcceebaa65d23 & chksm = cf639412f8141d04c149e3a14a5a18d32fd644be265cd8d69d2191220d50c99e51807265f247 & scene = 27 #
wechat_redirectworkup
http://127.0.0.1/xxx/1.0/info?tableType=common&type=gid&content=news_weixingzh|http://mp.weixin.qq.com / s? __ biz = MzI2ODAwNDYzMQ == % 26mid = 2690713706% 26idx = 3% 26sn = b180bcdc1d7a7de3315dcceebaa65d23% 26chksm = cf639412f8141d04c149e3a14a5a18d32fd644be265cd8d69d2191220d50c99e51807265f247% 26scene = 27 # wechat_redirectrules hexadecimal

value 1. + URL the + sign indicates a space. 2B% 2. space Spaces in URLs can be + sign or encoded %20 3. / separate directories and subdirectories %2F




4. ? separates the actual URL and the parameter %3F
5. % specifies the special character %25
6. # represents the bookmark %23
7. & delimiter between the parameters specified in the
URL%26 8. = the value of the specified parameter in the URL% 3D

can also be handled by online tools
http://tool.chinaz.com/tools/urlencode.aspx

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326612531&siteId=291194637