Mensa-API/api/fetch.go
2024-03-19 23:56:55 +01:00

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)
}