python querystring encode_Java UriUtils.encodeQueryParam方法代碼示例
import org.springframework.web.util.UriUtils; //導入方法依賴的package包/類
private URI buildURI(OTXEndpoints endpoint, Map endpointParametersMap) throws URISyntaxException, MalformedURLException {
String endpointString = endpoint.getEndpoint();
if (endpointParametersMap != null) {
boolean first = true;
for (Map.Entry otxEndpointParametersEntry : endpointParametersMap.entrySet()) {
if (otxEndpointParametersEntry.getKey().isRestVariable()) {
endpointString = endpointString.replace("{" + otxEndpointParametersEntry.getKey().getParameterName() + "}", otxEndpointParametersEntry.getValue().toString());
} else {
if (first) {
endpointString = endpointString + "?";
first = false;
}
try {
String parameterName = otxEndpointParametersEntry.getKey().getParameterName();
String value = UriUtils.encodeQueryParam(otxEndpointParametersEntry.getValue().toString(), "UTF-8");
endpointString = endpointString + String.format("%s=%s&", parameterName, value);
} catch (UnsupportedEncodingException e) {
log.error("Unpossible");
}
}
}
}
if (otxPort != null) {
return new URL(otxScheme, otxHost, otxPort, endpointString).toURI();
} else {
return new URL(otxScheme, otxHost, endpointString).toURI();
}
}
python querystring encode_Java UriUtils.encodeQueryParam方法代碼示例相关推荐
- python datetime datetime_Python datetime.tzinfo方法代碼示例
本文整理匯總了Python中datetime.datetime.tzinfo方法的典型用法代碼示例.如果您正苦於以下問題:Python datetime.tzinfo方法的具體用法?Python da ...
- python execute_command err_Python management.execute_from_command_line方法代碼示例
本文整理匯總了Python中django.core.management.execute_from_command_line方法的典型用法代碼示例.如果您正苦於以下問題:Python manageme ...
- python template languages_Python template.TemplateSyntaxError方法代碼示例
本文整理匯總了Python中django.template.TemplateSyntaxError方法的典型用法代碼示例.如果您正苦於以下問題:Python template.TemplateSynt ...
- python time strptime_Python time.strptime方法代碼示例
本文整理匯總了Python中time.strptime方法的典型用法代碼示例.如果您正苦於以下問題:Python time.strptime方法的具體用法?Python time.strptime怎麽 ...
- python柱状图zzt_Python torch.diag方法代碼示例
本文整理匯總了Python中torch.diag方法的典型用法代碼示例.如果您正苦於以下問題:Python torch.diag方法的具體用法?Python torch.diag怎麽用?Python ...
- python的concatetate_Python tensorflow.truncated_normal_initializer方法代碼示例
本文整理匯總了Python中tensorflow.truncated_normal_initializer方法的典型用法代碼示例.如果您正苦於以下問題:Python tensorflow.trunca ...
- python turtle color_Python turtle.color方法代碼示例
本文整理匯總了Python中turtle.color方法的典型用法代碼示例.如果您正苦於以下問題:Python turtle.color方法的具體用法?Python turtle.color怎麽用?P ...
- python asyncio future_Python asyncio.ensure_future方法代碼示例
本文整理匯總了Python中asyncio.ensure_future方法的典型用法代碼示例.如果您正苦於以下問題:Python asyncio.ensure_future方法的具體用法?Python ...
- python psutil.disk_Python psutil.disk_partitions方法代碼示例
本文整理匯總了Python中psutil.disk_partitions方法的典型用法代碼示例.如果您正苦於以下問題:Python psutil.disk_partitions方法的具體用法?Pyth ...
最新文章
- 华硕fx80装linux,华硕fx80【解决思路】
- [Web API] 如何让 Web API 统一回传格式以及例外处理[转]
- 伯努利分布方差_统计知识(4)——分布
- Chart Share
- JavaWeb-SpringBoot(抖音)_二、服务器间通讯
- 微信公众号支付php demo,200行代码实现微信支付-公众号支付,不再踩坑,附:demo...
- web.xml(8)_jsp-config
- effective python目录_Effective python(七):协作开发
- 数据链路层的是三个基本问题
- 佛系张小龙和他的微信帝国 | 畅言
- 笔记本电脑黑屏但还在运作怎么办
- COM学习(四)——COM中的数据类型
- 安装floodlight遇到的问题和解决
- Tomcat7下配置SSI,同时解决中文乱码问题
- redis的简单操作
- windows whistler系统安装
- 免费分享佳能ir c3320 c3330 c3325彩色复印机中文维修手册
- C/C++获取CPU等硬件信息屏幕截图
- 把filedia设置为0可以不弹出对话框保存文件
- 分享一款光谱分析软件(离线分析软件,导入光谱数据即可分析),功能超级多,超级强大,计算荧光量子效率,发射光谱的拉曼峰,计算共振能量转移(FRET)效率等