|
<< Click to Display Table of Contents >> Navigation: Telegram > 2023 > 09 > 03 > Telegram_2023-09-03T13 |
2023-09-03T13:48:53
Content handler is powerful enough for you to create a complete rest full API. You won't need anything else. Put IWUtils in uses and use:
type: code GetAuthorizationFields to Basic authentication.
To reply only Json: type: code aReply.ContentType := MIME_JSON;
You have all control:
type: code aRequest.Params.Count
aRequest.Files.Count
aRequest.ContentType
aRequest.HttpMethod (hmPost, hmGet, hmDelete, etc)
aReply.Code := 200;
aReply.WriteString({\result\:\This is a json from IW Content Handkle\});