bug:#15 lower Timeout for http request

This commit is contained in:
masterElmar
2023-11-30 18:29:10 +01:00
parent 70a86bc5ca
commit 1c7aa23433

View File

@@ -309,8 +309,12 @@ func toUtf8(iso88591Buf []byte) string {
func getPlanHTML(semester string, matrikel string) (string, error) {
url := "https://stundenplan.htwk-leipzig.de/" + string(semester) + "/Berichte/Text-Listen;Studenten-Sets;name;" + matrikel + "?template=sws_semgrp&weeks=1-65"
client := http.Client{
Timeout: 5 * time.Second,
}
// Send GET request
response, err := http.Get(url)
response, err := client.Get(url)
if err != nil {
fmt.Printf("Error occurred while making the request: %s\n", err.Error())
return "", err