Files
moloapp/example/fw/Negotiate.hpp
T

23 lines
534 B
C++
Raw Normal View History

#pragma once
// Server-driven content negotiation: parses Accept with q weights, picks one
// handler-declared format, answers 406 when nothing matches.
// Gap: real molo::negotiate in 05-request-routing.md owns suffix and
// format-override rules.
#include <string>
#include <vector>
#include "App.hpp"
namespace molo::example::fw {
struct Offer {
std::string media_type;
};
std::string negotiate(const std::string& accept,
const std::vector<std::string>& available);
} // namespace molo::example::fw