Búsqueda simple realizada en Go para simplificar la vida del programador.
Default
go get github.com/jad21/fetch
import (
"github.com/jad21/fetch"
)
Para ejecutar la prueba del proyecto
go test -v --cover
response, err := fetch.Get("https://httpbin.org/get/", nil)
header := http.Header{
"Content-Type": []string{"application/json"},
"User-Agent": []string{"My-User-Agent"},
}
f := fetch.New(fetch.WithHeader(header))
rsp, err := f.Get("https://httpbin.org/headers", nil)
login := map[string]interface{}{
"username": "jad21",
"password": "loremIpsum",
}
response, err := fetch.
IsJSON().
Post("https://httpbin.org/post/", fetch.NewReader(login))