Skip to content
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

Read raw bytes for routes of byte[] inputs, bypassing JSON marshalling #119

Merged
merged 1 commit into from Mar 29, 2019

Conversation

Zaid-Ajaj
Copy link
Owner

This PR makes a special case for routes of type byte[] -> Async<'t> where the input bytes are sent as binary content to the server and are read directly from the input request body stream, thus bypassing unnecessary JSON marshalling.

Fable client proxy sends Content-Type: application/octet-stream header along such requests that the server can intercept and reads the request stream while maintaining backwards-compatibility with old clients sending byte[] that goes through JSON marshalling pipeline.

Fixes #116 and completes the binary responses PR #117

@Zaid-Ajaj Zaid-Ajaj merged commit 39ddc47 into master Mar 29, 2019
@Zaid-Ajaj Zaid-Ajaj deleted the binary-inputs branch March 29, 2019 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant