Skip to content

Commit 61c1818

Browse files
committed
fixed calls in templates
1 parent 116344e commit 61c1818

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/swagger-codegen/src/main/resources/csharp-dotnet2/ApiClient.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ namespace {{clientPackage}}
8989
9090
// add file parameter, if any
9191
foreach(var param in fileParams)
92-
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType);
92+
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType);
9393
9494
if (postBody != null) // http body (model) parameter
9595
request.AddParameter("application/json", postBody, ParameterType.RequestBody);
@@ -116,7 +116,7 @@ namespace {{clientPackage}}
116116
/// <returns>Escaped string.</returns>
117117
public string EscapeString(string str)
118118
{
119-
return RestSharp.Contrib.HttpUtility.UrlEncode(str);
119+
return HttpUtility.UrlEncode(str);
120120
}
121121

122122
/// <summary>

0 commit comments

Comments
 (0)