Thanks Tom, that was good to read, will tuck that away for reference in 
future.

Gary

On Wednesday, 22 March 2017 01:46:21 UTC+10, Tom Keffer wrote:
>
> On the general problem of what makes a good RESTful API, I found the 
> document *RESTful Service Best Practices, Recommendations for Creating 
> Web Services 
> <http://www.restapitutorial.com/media/RESTful_Best_Practices-v1_0.pdf>* 
> very informative. It would definitely recommend a POST.
>
> -tk
>
> On Tue, Mar 21, 2017 at 8:40 AM, Alec Bennett <[email protected] 
> <javascript:>> wrote:
>
>>
>>
>> Just wondering if there was any particular reason you used a GET rather 
>> than a POST? I think the code to support passing the data via GET is a 
>> little simpler than a POST but since GET includes all of the data in the 
>> URL my nginx access log is getting hammered. I estimate about 55Mb per day.
>>
>>
>> Very interesting, I hadn't considered that. I'll switch to POST later 
>> today. 
>>
>>
>>
>>
>>
>>
>>
>> Gary
>>
>> On Tuesday, 21 March 2017 13:09:56 UTC+10, gjr80 wrote:
>>>
>>> Good work, I must admit I had been stuck in the 'file transfer' paradigm 
>>> rather than 'data transfer' and whilst I have had loop based RSYNC working 
>>> on my LAN there was too much contention for my liking. I will have have a 
>>> look at this and see how your approach works for me.
>>>
>>> Gary
>>>
>>> On Tuesday, 21 March 2017 04:41:49 UTC+10, Alec Bennett wrote:
>>>>
>>>> The short answer to your question is no, nothing like that exists at 
>>>>> the moment. If you have your web server (or process that wil use 
>>>>> gauge-data.txt) on your weeWX machine then it is a simple matter for the 
>>>>> generated file to be saved wherever you want, but if you need to transfer 
>>>>> the file in near realtime to another machine then no that capability does 
>>>>> not exist at the moment.
>>>>>
>>>>
>>>> I added the ability to post live_data.json to a remote webserver, if 
>>>> anyone needs the ability, it's here:
>>>>
>>>> https://github.com/wrybread/weewx-realtime_gauge-data
>>>>
>>>> It works by posting all the data it writes to live_data.json to a PHP 
>>>> script on a remote webserver using a GET statement. Note the PHP script 
>>>> here, that receives the data:
>>>>
>>>>
>>>> https://github.com/wrybread/weewx-realtime_gauge-data/tree/master/PHP%20Script
>>>>
>>>> If anyone wants me to convert it to Python for consistency, let me know.
>>>>
>>>> To use, set the following value in the RealtimeGaugeData section of 
>>>> your weewx config file:
>>>>
>>>> remote_server_url = 
>>>> http://yourwebsite.com/path_to/receive_conditions.php
>>>>
>>>> It's my first time posting a fork to github, so please let me know if I 
>>>> did anything dumb. And let me know if anyone wants me to change anything.
>>>>
>>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/ws7u2itvJMw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to