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