https://github.com/coderyi/urlparser
an url parse/encode/decode tool
https://github.com/coderyi/urlparser
Last synced: over 1 year ago
JSON representation
an url parse/encode/decode tool
- Host: GitHub
- URL: https://github.com/coderyi/urlparser
- Owner: coderyi
- License: mit
- Created: 2018-09-10T06:41:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-20T09:44:42.000Z (almost 8 years ago)
- Last Synced: 2025-03-20T13:32:37.836Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 5.86 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
一个解析,Encode 和 Decode URL的小型C++库。
示例
```
std::string tempURL = "http://user:password@www.google.com:80/path?search";
urlhelper::url parsed = urlhelper::ParseHTTPURL(tempURL);
std::cout << "1 " << parsed.protocol << "\n"
<< "2 " << parsed.user << "\n"
<< "3 " << parsed.password << "\n"
<< "4 " << parsed.host << "\n"
<< "5 " << parsed.port << "\n"
<< "6 " << parsed.path << "\n"
<< "7 " << parsed.search << std::endl;
std::cout << urlhelper::URLEncode(tempURL) << "\n";
std::cout << urlhelper::URLDecode(urlhelper::URLEncode(tempURL)) << "\n";
```