Skip to content

Commit

Permalink
Marsrequest asString
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisspyB committed Jan 24, 2024
1 parent 0023288 commit eb378e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/metkit/mars/MarsRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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> MarsRequest::parse(std::istream& in, bool strict) {
Expand Down
2 changes: 2 additions & 0 deletions src/metkit/mars/MarsRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb378e8

Please sign in to comment.