Skip to content

Commit 3d0cc92

Browse files
committed
Some more, incomplete documentation.
1 parent 6a7205e commit 3d0cc92

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

http/src/network/http/v2/client/client.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ namespace network {
228228
/**
229229
* \ingroup http_client
230230
* \class client network/http/v2/client/client.hpp
231-
* \brief An HTTP client.
231+
* \brief A class that encapsulates the operations and methods
232+
* for communicating with an HTTP servier.
232233
*/
233234
class client {
234235

http/src/network/http/v2/client/response.hpp

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,46 @@
2020
namespace network {
2121
namespace http {
2222
namespace v2 {
23+
/**
24+
* \ingroup http_client
25+
* \class response network/http/v2/client/response.hpp
26+
* \brief A class that encapsulates an HTTP response.
27+
*/
2328
class response {
2429

2530
public:
2631

32+
/**
33+
* \typedef string_type
34+
* \brief The responses string_type.
35+
*/
2736
typedef std::string string_type;
37+
38+
/**
39+
* \typedef headers_type
40+
* \brief
41+
*/
2842
typedef std::vector<std::pair<string_type, string_type>> headers_type;
43+
44+
/**
45+
* \typedef headers_iterator
46+
*/
2947
typedef headers_type::iterator headers_iterator;
48+
49+
/**
50+
* \typedef const_headers_iterator
51+
*/
3052
typedef headers_type::const_iterator const_headers_iterator;
3153

54+
/**
55+
* \brief Constructor.
56+
*/
3257
response() { }
3358

59+
/**
60+
* \brief Copy constructor.
61+
* \param other The other response object.
62+
*/
3463
response(const response &other)
3564
: status_(other.status_)
3665
, version_(other.version_)
@@ -39,6 +68,10 @@ namespace network {
3968

4069
}
4170

71+
/**
72+
* \brief Move constructor.
73+
* \param other The other response object.
74+
*/
4275
response(response &&other) noexcept
4376
: status_(std::move(other.status_))
4477
, version_(std::move(other.version_))
@@ -47,26 +80,45 @@ namespace network {
4780

4881
}
4982

83+
/**
84+
* \brief Assignment operator.
85+
* \param other The other response object.
86+
*/
5087
response &operator= (response other) {
5188
other.swap(*this);
5289
return *this;
5390
}
5491

92+
/**
93+
* \brief Swap function.
94+
* \param other The other response object.
95+
*/
5596
void swap(response &other) noexcept {
5697
std::swap(status_, other.status_);
5798
std::swap(version_, other.version_);
5899
std::swap(status_message_, other.status_message_);
59100
std::swap(headers_, other.headers_);
60101
}
61102

103+
/**
104+
* \brief Returns the HTTP response status.
105+
* \returns The status code.
106+
*/
62107
std::uint16_t status() const {
63108
return status_;
64109
}
65110

111+
/**
112+
* \brief Returns the HTTP response status message.
113+
* \returns The status message.
114+
*/
66115
string_type status_message() const {
67116
return status_message_;
68117
}
69118

119+
/**
120+
* \brief
121+
*/
70122
boost::iterator_range<const_headers_iterator> headers() const {
71123
return boost::make_iterator_range(std::begin(headers_), std::end(headers_));
72124
}
@@ -81,6 +133,10 @@ namespace network {
81133
// append_body
82134
// get_body
83135

136+
/**
137+
* \brief Returns the HTTP version.
138+
* \returns The HTTP version.
139+
*/
84140
string_type version() const {
85141
return version_;
86142
}

0 commit comments

Comments
 (0)