mirror of
https://github.com/LeRoid-hub/Mensa-API.git
synced 2025-01-31 11:44:55 +00:00
15 lines
187 B
Go
15 lines
187 B
Go
|
package fetch
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func Fetch(url string) (*http.Response, error) {
|
||
|
u, err := url.ParseRequestURI(url)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
return http.Get(url)
|
||
|
}
|