Webtags (preserving history): Difference between revisions

Line 691: Line 691:


If you are using the api in a context where it does not matter if decimal commas or decimal points are in the api, simply omit the '''rc''' as first item, and just include tag names separated by ampersands.
If you are using the api in a context where it does not matter if decimal commas or decimal points are in the api, simply omit the '''rc''' as first item, and just include tag names separated by ampersands.
== "POST" approach ==
The word "Post" in a computer environment means that the Hypertext Transfer Protocol (HTTP) used by the internet is transfer information enclosed in the body of the request message. Put slightly less technically in this approach you produce a text file with the details of what tags you want and send it to the api server.
You may have used POST as an attribute when defining the action of a HTML form.  The post approach has a few advantages over get:
*The parameters are not shown in the query-string, so are not obvious to the person looking over your shoulder, nor do they appear in a history list of sites that the browser has visited.
*A URL with query-string is restricted in total length (the restriction is dependent on a number of other factors, but might be at something like 1000 characters in total), so GET comes with a restriction on how many parameters can be specified; POST can handle much longer requests.
here is an example text file with some web tags in it, let us store it in '''process.txt''':
<pre><#time format="yyyy-MM-dd hh:mm:ss">,<#temp rc=y>,<#hum>,<#dew rc=y>,<#RecentFeelsLike rc=y d=1></pre>
The command '''http: //localhost:8998/api/tags/process.txt''' would send that text file to the api server, and you would get back the date and time in ISO format, the current temperature with decimal point, the current humidity, the current dew point with decimal point, and what the feels like temperature was one day ago at this time again with decimal point.


=The Web Tags for Cumulus =
=The Web Tags for Cumulus =
5,838

edits