Skip to content
Discussion options

You must be logged in to vote

TryComputeLength means if the length can be given immediately. Serializing arbitrary content may consume time that's sensitive for control flow.

You can use LoadIntoBufferAsync() to do the serialization. It will store the result internally, then the length can be get immediately. See my code here.

It also surprises me when I was debugging my code, because inspecting the json content in debugger will make the code execute successfully.

Many code supposes chunked encoding is supported everywhere, because it's a part of HTTP spec. So does HttpClient.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@moisoiu
Comment options

@stuartclode
Comment options

Answer selected by eerhardt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants