User Tools

Site Tools


tutorials:htmlaccess

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:htmlaccess [2017/12/12 14:30] James Sentmantutorials:htmlaccess [2023/02/13 14:52] (current) – external edit 127.0.0.1
Line 5: Line 5:
 In spite of it’s name the “JSON” server doesn’t actually require any JSON to be a part of the connection. Our first use for it was receiving JSON requests from a specific device and the name stuck. It will happily handle normal web requests and form variables that have nothing to do with JSON at all. In spite of it’s name the “JSON” server doesn’t actually require any JSON to be a part of the connection. Our first use for it was receiving JSON requests from a specific device and the name stuck. It will happily handle normal web requests and form variables that have nothing to do with JSON at all.
  
-First create an accessor unit in assigned to the JSON server. The name of the unit can be anything that makes sense to you, but make the address something easy to access via the path in the JSON server. In this example the Unit will be addressed as “ACCESS”.+First create an accessor Unit assigned to the JSON server. The name of the unit can be anything that makes sense to you, but make the address something easy to access via the path in the JSON server. In this example the Unit will be addressed as “ACCESS”.
  
 In the ON script use the “Insert” toolbar button to add the “JSONRequest” handler. The form of the handler in AppleScript is like this: In the ON script use the “Insert” toolbar button to add the “JSONRequest” handler. The form of the handler in AppleScript is like this:
Line 123: Line 123:
 </code> </code>
  
-The [[dictionary:lists:alloflist|all of list]] verb returns an AppleScript list of all the units in that list. Then you can use the simple AppleScript “is in” or “is not in” commands to know if the unit is in the list or not.+The [[dictionary:lists:alloflist|all of list]] verb returns an AppleScript list of all the units in that list. Then you can use the simple AppleScript “is in” or “is not in” commands to know if the unit is in the list or not. If you wanted you could use a Group rather than a List. Place the units in a group and use the [[dictionary:lists:allofgroup|all of group]] verb instead to get the list of it’s Units.
  
 If control is requested for a unit not in that list a “403: Forbidden” error will be returned to the browser or other device.  If control is requested for a unit not in that list a “403: Forbidden” error will be returned to the browser or other device. 
tutorials/htmlaccess.1513089028.txt.gz · Last modified: 2023/02/13 14:51 (external edit)