Poco::URI
- #include<iostream>
- #include<typeinfo>
- #include<Poco/Path.h>
- #include <Poco/DirectoryIterator.h>
- #include <Poco/URI.h>
- using namespace std;
- using namespace Poco;
- int main(){
- string s("/media/ygy/YGY");
- Path my_path (s);
- cout<< Path::current()<<endl;
- URI uri(s);
- cout<<uri.toString()<<endl;
- uri.setFragment("ygy");
- uri.setAuthority("Authority");
- uri.setHost("Host");
- uri.setPath(s);
- //uri.setPathEtc("pathEtc");
- uri.setPort();
- uri.setQuery("query");
- uri.setRawQuery("RawQuery");
- uri.setScheme("scheme");
- uri.setUserInfo("userInfo");
- cout <<uri.getFragment()<<endl;
- cout<<uri.getHost()<<endl;
- cout<<uri.getPath()<<endl;
- cout<<uri.getPathAndQuery()<<endl;
- cout<<uri.getPathEtc()<<endl;
- cout <<uri.getPort()<<endl;
- cout <<uri.getQuery()<<endl;
- cout<<uri.getRawQuery()<<endl;
- cout <<uri.getScheme()<<endl;
- cout<<uri.getUserInfo()<<endl;
- cout<<"------"<<endl;
- cout<<uri.toString()<<endl;
- }
- root@goodjob:~/work/poco/path# ./test
/home/ygy/work/poco/path/
/media/ygy/YGY
ygy
Host
/media/ygy/YGY
/media/ygy/YGY?RawQuery
/media/ygy/YGY?RawQuery#ygy
80
RawQuery
RawQuery
scheme
userInfo
------
scheme://userInfo@Host:80/media/ygy/YGY?RawQuery#ygy
Poco::URI的更多相关文章
- c++ poco库https调用
#include "Poco\File.h"#include "Poco\FileStream.h"#include "Poco\Process.h& ...
- Poco C++——HTTP的post请求和get请求
两种请求都需要包含头文件: #include <iostream> #include <string> #include "Poco/Net/HTTPClientSe ...
- Poco之ftp目录切换与创建
TEMPLATE = app QT += qml quick widgets#LIBS += -lPocoFoundation -lPocoXML -lPocoNetSOURCES += main.c ...
- [poco] HttpRequest之post方法
转自 http://www.cnblogs.com/yuanxiaoping_21cn_com/archive/2012/06/10/2544032.html #import <iostream ...
- 【转】Poco 1.4.2 HTTPClientSession/HTTPRequest 使用使用代理(proxy)需要注意的一点
Poco 1.4.2 HTTPClientSession/HTTPClientSession 在使用代理的时候,request的URI不能包含协议和主机.否则会出错. 不使用代理的时候,以下代码能正常 ...
- 使用POCO发送HTTP(S)请求
POCO GitHub地址https://github.com/pocoproject/poco http_example.cpp #include <iostream> #include ...
- MongoDB地理空间数据存储及检索
目录 1.存入地理数据 GeoJSON数据存入 1.Ponit 点数据 2.LineString 线数据(多段线) 3. Polygon 多边形数据 4.MultiPoint多点.MultiLineS ...
- android开发-c++代码调用so库
Android项目的CMakeLists.txt代码如下,so文件放在项目的$Project/app/src/main/jniLibs/$arch下,$arch替换为arm64-v8a armv7a等 ...
- C++写动态站点之HelloWorld!
演示样例源码下载地址:Fetch_Platform.7z 更复杂的代码可參考本博客BBS的实现 简单的说.动态站点就是能够动态变更的站点.动态变化的内容通常来自后端数据库.例如以下省略万字(动态站点) ...
随机推荐
- git基础(1)
一.获取git仓库(两种方法)1.现有目录初始化 git init目录有文件(非空文件)进行跟踪执行:git add+文件名提交:git commit -m(提交信息说明) 2.克隆现有代码仓库的代码 ...
- 使用gitlab时候 fork仓库不会实时从主仓库更新解决方案
付费用户可以使用现成的方案,地址见 链接 但是私有gitlab时候,需要手动进行如下操作 1. Clone your fork: git clone git@github.com:YOUR-USERN ...
- List和String数组相互转化
在工作中经常会遇到需要String[] 参数的地方,我们可以先定义一个list,再转成String[] 来使用,使用list的好处自然是可以随时方便的添加删除元素,下面是方法: List list = ...
- lintcode433 岛屿的个数
岛屿的个数 给一个01矩阵,求不同的岛屿的个数. 0代表海,1代表岛,如果两个1相邻,那么这两个1属于同一个岛.我们只考虑上下左右为相邻. 您在真实的面试中是否遇到过这个题? Yes 样例 在矩阵: ...
- Ubuntu—安装并运行sublime
step1 到官网看看 https://www.sublimetext.com/3 step2 根据版本选择,我的是32位的 step3 ubuntu终端安装 (1)切换目录 -$ cd /opt ...
- 简析@Resource 和 @Autowired的区别
@Autowird @Autowird 属于spring框架,默认使用类型(byType)进行注入,例如下面代码: @Autowired public IUserService userService ...
- POJ 2986 A Triangle and a Circle(三角形和圆形求交)
Description Given one triangle and one circle in the plane. Your task is to calculate the common are ...
- NIO 服务端TCP连接管理的方案
最近做的一个项目需要在服务端对连接端进行管理,故将方案记录于此. 方案实现的结果与背景 因为服务端与客户端实现的是长连接,所以需要对客户端的连接情况进行监控,防止无效连接占用资源. 完成类似于心跳的接 ...
- Android - 时间 日期相关组件
源码下载地址 : -- CSDN : http://download.csdn.net/detail/han1202012/6856737 -- GitHub : https://github.co ...
- Internet Secure
key Secret key(密钥):ues the same key to Encryption and decryption(symmetric-key)对称加密,需要绝对安全的空间来传递key ...