![]() |
How URL routing - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: How URL routing (/thread-3103.html) |
How URL routing - matija - 03-29-2023 How implement URL routing products? Where to start? Example: http://localhost/articles/article-1 http://localhost/articles/article-2 RE: How URL routing - Alexandre Machado - 04-19-2023 Hi Matija, I asked you some questions via email, but this is a job for content handlers. The content handler can be registered to any URL path and respond with any type of content. Basically you would create something like this: Code: myHandler := TMyContentHandler.Create; and your content handler would look like this: Code: unit uMyContentHandler; This is a very generic content handler implementation where the response can be anything (a plain text file, a JSON or XML content, a full HTML page, an HTML fragment, JavaScript, whatever you want). The important part here is to determine what the caller expects to receive and how it intends to use the content provided by the content handler... |