-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
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
ContentLength missing in FileParameter #814
Comments
I met the same issue. Any one have update? |
No one.. for the moment the only workaround i found is to set the ContentLength manually on the Request. |
I guess since the method now requires to specify the length, this issue can be closed public IRestRequest AddFile(string name, Action<Stream> writer, string fileName, long contentLength, string contentType = null) |
No, I am wrong, actually, you meant using |
Ok, here is the thing. We give you an option to write directly to the request stream. How would you expect us to know the length of the data that you will be writing to it? There is a |
The AddFile method with Writer Delegate param on RestRequest doesn't set the file ContentLength.
When Delegate write on Request stream throw a ProtocollViolationException (The number of bytes to be written to the stream exceeded Content-Length size specified) because file ContentLength is zero.
The text was updated successfully, but these errors were encountered: