diff --git a/src/metkit/mars/MarsRequest.cc b/src/metkit/mars/MarsRequest.cc index 63bdb72..eccb48c 100644 --- a/src/metkit/mars/MarsRequest.cc +++ b/src/metkit/mars/MarsRequest.cc @@ -465,6 +465,12 @@ void MarsRequest::erase(const std::string& name) { } } +std::string MarsRequest::asString() const { + std::ostringstream oss; + oss << *this; + return oss.str(); +} + //---------------------------------------------------------------------------------------------------------------------- std::vector MarsRequest::parse(std::istream& in, bool strict) { diff --git a/src/metkit/mars/MarsRequest.h b/src/metkit/mars/MarsRequest.h index 47c2f4f..0b834f5 100644 --- a/src/metkit/mars/MarsRequest.h +++ b/src/metkit/mars/MarsRequest.h @@ -115,6 +115,8 @@ class MarsRequest { void erase(const std::string& param); + std::string asString() const; + public: // static methods static MarsRequest parse(const std::string& s, bool strict = false);