How implement URL routing products? Where to start?
Example:
http://localhost/articles/article-1
http://localhost/articles/article-2
Example:
http://localhost/articles/article-1
http://localhost/articles/article-2
How URL routing
|
How implement URL routing products? Where to start?
Example: http://localhost/articles/article-1 http://localhost/articles/article-2
04-19-2023, 05:23 AM
(This post was last modified: 04-19-2023, 05:25 AM by Alexandre Machado.)
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... |
« Next Oldest | Next Newest »
|