MCPcopy Create free account
hub / github.com/boostorg/beast / process_request

Method process_request

example/http/server/fast/http_server_fast.cpp:185–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 }
184
185 void process_request(http::request<request_body_t, http::basic_fields<alloc_t>> const& req)
186 {
187 switch (req.method())
188 {
189 case http::verb::get:
190 send_file(req.target());
191 break;
192
193 default:
194 // We return responses indicating an error if
195 // we do not recognize the request method.
196 send_bad_response(
197 http::status::bad_request,
198 "Invalid request-method '" + std::string(req.method_string()) + "'\r\n");
199 break;
200 }
201 }
202
203 void send_bad_response(
204 http::status status,

Callers

nothing calls this directly

Calls 2

methodMethod · 0.80
targetMethod · 0.80

Tested by

no test coverage detected