I am trying to us tag syntax for a rest api, and I am coming to the conclusion it won’t work. I can create the mappings in lucre web admin, and if I run the following code (using cfscript):
{“version”:“10.16”,“buildnumber”:“”,“additionalinformation”:“”,“archModel”:64,“hostname”:“Macbook-Air”,“name”:“Mac OS X”,“macAddress”:“##-##-##-##-##-##”,“arch”:“x86_64”}
Hi @Doug_Hyde, I’ve checked your above test codes. Both tag and script syntax works fine for me. But if I did any changes in restPath means, it had needed to restart lucee to work with the new restPath. Did you try that with restarting lucee?
FYI, you can use the preformatted text field to include the codes in a post and also I edited your details in the post to show the code.
I put one cfc in the directory, then the other. I now have the two files in the same directory, one with restpath = “system” and the other with rest path = “system2”. I tried restarting as suggested by cfmitrah and that seemed to work - I have the tag based version working now. Thanks to you both. Curious though that one has to restart for tag-based, and not for the script.
What I’ve also done in the past is: instead of restarting Lucee, I just run the restinitapplication() from within a simple .cfm template (e.g. called initRest.cfm) in the same web context. Then calling that template should refresh everything quickly during development.