Mensa-API/api/fetch.go

17 lines
199 B
Go
Raw Normal View History

2024-03-19 22:56:55 +00:00
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)
}