Understanding Route Settings on the boot asio Server

Asked 1 years ago, Updated 1 years ago, 88 views

On the boot asio server, I would like to make the route the request URL (such as html file), but as far as I looked it up, it doesn't show how to do it.Can someone teach me?

[Additional note]
For example, if localhost:3000/hoge.html is accessed, hoge.html is displayed, and if localhost:3000/fuga.html is accessed, fuga.html is displayed.
https://qiita.com/ritukiii/items/8173ff98f31c2f76b39a
I'd like to do the C++ version of this article, which is a combination of "Try separating processing by request" and "Try displaying HTML."

html c++ boost

2022-09-30 19:32

1 Answers

For HTTP Server as described in the official Boost.Asio document, simply configure the third argument <doc_root> for the server constructor.


2022-09-30 19:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.