Skip to content

Commit

Permalink
Added doc comments to RequestBuilder and ResponseBuilder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Vitebskiy committed May 12, 2015
1 parent fa06ab9 commit 05e46e7
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
35 changes: 35 additions & 0 deletions code/RequestBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,53 @@ namespace http
RequestBuilder();
RequestBuilder(const Request& request);

/*!
* @brief Obtain the HTTP method used by the client for the request.
* @return One of the enumeration values.
*/
const Method method() const;

/*!
* @brief Get the HTTP method as a string.
*/
std::string method_name() const;

/*!
* @brief Set the HTTP method used by the client for the request.
* @param method The HTTP method.
*/
void set_method(const Method& method);

/*!
* @brief Check if client requested a connection upgrade.
*/
bool upgrade() const;

/*!
* @brief Sets if client requested a connection upgrade.
* @param upgrade The value of the upgrade flag.
*/
void set_upgrade(bool upgrade);

/*!
* @brief Get the request URL.
*/
const std::string& url() const;

/*!
* @brief Sets the request URL.
* @param url The request URL.
*/
void setUrl(const std::string& url);

/*!
* @brief Gets a string representation of the request line.
*/
std::string request_line() const;

/*!
* @brief Gets a full string representation of the request.
*/
std::string to_string() const;

private:
Expand Down
19 changes: 19 additions & 0 deletions code/ResponseBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,30 @@ namespace http
ResponseBuilder();
ResponseBuilder(const Response& response);

/*!
* @brief Gets the HTTP status code of the response.
*/
int status() const;

/*!
* @brief Gets the reason string of the HTTP status code.
*/
std::string status_reason() const;

/*!
* @brief Sets the HTTP status code.
* @param status The HTTP status code.
*/
void set_status(int status);

/*!
* Gets a string representation of the HTTP response status line.
*/
std::string status_line() const;

/*
* Gets a full string representation of the HTTP response.
*/
std::string to_string() const;

private:
Expand Down

0 comments on commit 05e46e7

Please sign in to comment.