forked from ros-industrial/abb_librws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvements from ros-industrial#136
- Loading branch information
Showing
17 changed files
with
2,504 additions
and
2,741 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
#include <Poco/Net/HTTPRequest.h> | ||
#include <Poco/Net/HTTPResponse.h> | ||
|
||
|
||
namespace abb :: rws | ||
{ | ||
/** | ||
* \brief A struct for containing the result of a communication. | ||
*/ | ||
struct POCOResult | ||
{ | ||
/** | ||
* \brief A constructor. | ||
* | ||
* \param http_status HTTP response status | ||
* \param header_info HTTP response header info | ||
* \param content HTTP response content | ||
*/ | ||
POCOResult(Poco::Net::HTTPResponse::HTTPStatus http_status, | ||
Poco::Net::NameValueCollection const& header_info, std::string const& content); | ||
|
||
|
||
|
||
/** | ||
* \brief Status of the HTTP response. | ||
*/ | ||
Poco::Net::HTTPResponse::HTTPStatus httpStatus() const noexcept | ||
{ | ||
return httpStatus_; | ||
} | ||
|
||
|
||
/** | ||
* \brief HTTP response header info. | ||
*/ | ||
auto const& headerInfo() const noexcept | ||
{ | ||
return headerInfo_; | ||
} | ||
|
||
|
||
/** | ||
* \brief Content of the HTTP response. | ||
*/ | ||
std::string const& content() const noexcept | ||
{ | ||
return content_; | ||
} | ||
|
||
|
||
private: | ||
Poco::Net::HTTPResponse::HTTPStatus httpStatus_; | ||
std::vector<std::pair<std::string, std::string>> headerInfo_; | ||
std::string content_; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.