docs: fix serializer javadocs to use 'writing' instead of 'reading' #177
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.
Summary
Fixed incorrect terminology in the
serializer.hpp
documentation. The javadocs were using "reading" terminology when they should use "writing" to correctly describe the serializer's purpose.Background
The serializer is used to write HTTP messages to remote peers (e.g., with
asio::write
), while the parser is used to read from remote peers (e.g., withasio::read
). The documentation should consistently reflect this perspective.Changes
Updated the
start_stream()
method documentation in three places:Main description (line 340-341): Changed from "for reading the body from an external source" to "for writing the body to an external destination"
Control flow description (line 349): Changed from "while reading from an external source" to "for writing to the remote peer"
Return value description (line 400): Changed from "for reading body content into" to "for writing body content into"
Example
The corrected documentation now properly describes the serializer's role:
// Returns a stream object for WRITING the body to an external destination serializer::stream strm = serializer.start_stream(response);
This aligns with typical usage where the serializer is used with write operations:
Fixes issue where the javadocs incorrectly suggested the serializer was for reading data instead of writing it.
Original prompt
Fixes #176
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.