Rename the methods to retrieve outgoing-body
from write
to body
#64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this PR, the
outgoing-request
andoutgoing-response
resources have methodswrite
which returnresult<outgoing-body>
.body
is a better name thanwrite
- it makes it explicit this is about access to a body resource. Theoutgoing-body
resource itself has a methodwrite
which gives the body contents as a stream. Using different names for these closely related but different methods makes their distinction more clear.Additionally: the docs for
outgoing-request.write
were incorrect - the returnedoutgoing-body
is not a child of theoutgoing-request
(oroutgoing-response
). If we were to enforce a child relationship here, outgoing body streaming (i.e. writing to the body after the request or response has been initiated) would not be possible. The wordchild
had been left in the docs by accident, and this PR removes it and makes the docs for bothbody
methods the same.