Use percent encoding for path parameters (#2649)

This commit is contained in:
sunn
2019-04-12 05:26:48 +02:00
committed by William Cheng
parent 85d05981ec
commit 7af94fa1e8
4 changed files with 10 additions and 10 deletions

View File

@@ -31,7 +31,7 @@ void
{{#pathParams}}
QString {{paramName}}PathParam("{");
{{paramName}}PathParam.append("{{baseName}}").append("}");
fullPath.replace({{paramName}}PathParam, ::{{cppNamespace}}::toStringValue({{paramName}}));
fullPath.replace({{paramName}}PathParam, QUrl::toPercentEncoding(::{{cppNamespace}}::toStringValue({{paramName}})));
{{/pathParams}}
{{#queryParams}}{{^collectionFormat}}
if (fullPath.indexOf("?") > 0)