Mensa-API/api/fetch/fetch.go

15 lines
187 B
Go
Raw Normal View History

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