Skip to content

Commit e9293d7

Browse files
committed
Adding more comments for the http_request/http_response to_string function.
1 parent c06afc5 commit e9293d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Release/include/cpprest/http_msg.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,14 @@ class http_response
430430

431431
/// <summary>
432432
/// Generates a string representation of the message, including the body when possible.
433+
/// Mainly this should be used for debugging purposes as it has to copy the
434+
/// message body and doesn't have excellent performance.
433435
/// </summary>
434436
/// <returns>A string representation of this HTTP request.</returns>
437+
/// <remarks>Note this function is synchronous and doesn't wait for the
438+
/// entire message body to arrive. If the message body has arrived by the time this
439+
/// function is called and it is has a textual Content-Type it will be included.
440+
/// Otherwise just the headers will be present.</remarks>
435441
utility::string_t to_string() const { return _m_impl->to_string(); }
436442

437443
/// <summary>
@@ -1095,8 +1101,14 @@ class http_request
10951101

10961102
/// <summary>
10971103
/// Generates a string representation of the message, including the body when possible.
1104+
/// Mainly this should be used for debugging purposes as it has to copy the
1105+
/// message body and doesn't have excellent performance.
10981106
/// </summary>
10991107
/// <returns>A string representation of this HTTP request.</returns>
1108+
/// <remarks>Note this function is synchronous and doesn't wait for the
1109+
/// entire message body to arrive. If the message body has arrived by the time this
1110+
/// function is called and it is has a textual Content-Type it will be included.
1111+
/// Otherwise just the headers will be present.</remarks>
11001112
utility::string_t to_string() const { return _m_impl->to_string(); }
11011113

11021114
/// <summary>

0 commit comments

Comments
 (0)