We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using a FormData request, in the method PrepareRequest of the ApiClient, when file is added to the request, RestSharp doesn't set the Content-Length.
foreach (var param in fileParams) { request.AddFile(param.Value.Name,` param.Value.Writer, param.Value.FileName, param.Value.ContentType); }
Version 2.10.2
At the time, the workaround i found was to modify the generated code and set the content length explicitly:
var index = 0; foreach (var param in fileParams) { request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); request.Files[index++].ContentLength = param.Value.ContentLength; }
The text was updated successfully, but these errors were encountered:
@glecchi is this the same issue as #2175?
Sorry, something went wrong.
Closing this as there's no update.
No branches or pull requests
Description
Using a FormData request, in the method PrepareRequest of the ApiClient, when file is added to the request, RestSharp doesn't set the Content-Length.
Swagger-codegen version
Version 2.10.2
Suggest a Fix
At the time, the workaround i found was to modify the generated code and set the content length explicitly:
The text was updated successfully, but these errors were encountered: