Separate fetch and fetch_json helper funcs

This commit is contained in:
Steffen Lange 2021-02-21 18:57:10 +01:00
parent 4a613a0d3b
commit 62a9f6f0c8
56 changed files with 63 additions and 58 deletions

View file

@ -19,7 +19,7 @@ class MyProgram extends PatchBase {
* Implement ```check()``` method to extract version information from website using this template:
```
function check() : bool {
if ($this->fetch('https://www.url.com/' [, true]))
if ($this->fetch[_json]('https://www.url.com/'))
return $this->parse...
return false;
}
@ -28,4 +28,4 @@ function check() : bool {
* ```parse_json(string)```
* ```parse(string)```
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WYQZCVJPVSS5L&source=url)
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WYQZCVJPVSS5L&source=url)