You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
support for binary request body and binary response in ruby #54
The http request adapter implementation needs to handle binary requests (photo upload) and binary responses (file download). This may require additional methods to be defined in the request adapter interface and the executor generator method to be updated.
When the request/response body is a string type, we'll have to use the stringIO wrapper which probably won't any memory improvements but will standardize the kind of objects we're passing around between the layers to support scenarios like uploading files.
Note: parseNode and serialization writer will have to implement close, and the code-gen will need to be updated to use blocks to auto-close instances
binary responses are read through send_primitive_async(..., StringIO, ...), and stream request bodies are sent. Both round-trip bytes intact on 0.24.0.
Activity
baywet commentedon Jan 3, 2023
After doing some research it appears that streams are materialized by the IO class.
We might need to set the raw body of the request and access the raw body of the response, as well as to configure the multipart middleware, more information
When the request/response body is a string type, we'll have to use the stringIO wrapper which probably won't any memory improvements but will standardize the kind of objects we're passing around between the layers to support scenarios like uploading files.
Note: parseNode and serialization writer will have to implement close, and the code-gen will need to be updated to use blocks to auto-close instances
Edit for primitives https://stackoverflow.com/questions/7862735/deserialize-json-primitives-with-the-built-in-ruby-json-library
baywet commentedon May 16, 2023
This also needs to be handled in the serialization code https://github.com/microsoft/kiota/blob/6e9ec1e80d21e1638e3d26634dceee7425071f83/src/Kiota.Builder/Writers/Ruby/CodeMethodWriter.cs#L375
andreaTP commentedon Oct 7, 2026
Fixed:
binary responses are read through
send_primitive_async(..., StringIO, ...), and stream request bodies are sent. Both round-trip bytes intact on 0.24.0.