Skip to content

Commit

Permalink
Merge pull request #10372 from swagger-api/issue-9041
Browse files Browse the repository at this point in the history
fixed calls in templates
  • Loading branch information
HugoMario committed Jul 8, 2020
2 parents 116344e + 61c1818 commit 6ec8781
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace {{clientPackage}}
// add file parameter, if any
foreach(var param in fileParams)
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType);
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType);
if (postBody != null) // http body (model) parameter
request.AddParameter("application/json", postBody, ParameterType.RequestBody);
Expand All @@ -116,7 +116,7 @@ namespace {{clientPackage}}
/// <returns>Escaped string.</returns>
public string EscapeString(string str)
{
return RestSharp.Contrib.HttpUtility.UrlEncode(str);
return HttpUtility.UrlEncode(str);
}

/// <summary>
Expand Down

0 comments on commit 6ec8781

Please sign in to comment.