mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-02 17:59:14 +02:00
bug:#15 lower Timeout for http request
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user