Skip to content

Commit

Permalink
Add convenient Accept header constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilienKia committed Aug 28, 2024
1 parent 03ca247 commit 9c0b0e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/pistache/http_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ namespace Pistache::Http::Header
: mediaRange_()
{ }

explicit Accept(const std::vector<Mime::MediaType>& mediaRange)
: mediaRange_(mediaRange)
{ }

explicit Accept(std::initializer_list<Mime::MediaType> mediaRange)
: mediaRange_(mediaRange)
{ }

void parseRaw(const char* str, size_t len) override;
void write(std::ostream& os) const override;

Expand Down

0 comments on commit 9c0b0e4

Please sign in to comment.