mirror of
				https://github.com/binwiederhier/ntfy.git
				synced 2025-10-31 13:02:24 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			282 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			282 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package main
 | |
| 
 | |
| import (
 | |
| 	"bufio"
 | |
| 	"log"
 | |
| 	"net/http"
 | |
| )
 | |
| 
 | |
| func main() {
 | |
| 	resp, err := http.Get("https://ntfy.sh/phil_alerts/json")
 | |
| 	if err != nil {
 | |
| 		log.Fatal(err)
 | |
| 	}
 | |
| 	defer resp.Body.Close()
 | |
| 	scanner := bufio.NewScanner(resp.Body)
 | |
| 	for scanner.Scan() {
 | |
| 		println(scanner.Text())
 | |
| 	}
 | |
| }
 | 
