go-zero/rest/httpc/vars.go
Kevin Wan 50de01fb49
feat: add httpc.Do & httpc.Service.Do (#1775)
* backup

* backup

* backup

* feat: add httpc.Do & httpc.Service.Do

* fix: not using strings.Cut, it's from Go 1.18

* chore: remove redudant code

* feat: httpc.Do finished

* chore: fix reviewdog

* chore: break loop if found

* add more tests
2022-04-11 11:00:28 +08:00

18 lines
388 B
Go

package httpc
import "errors"
const (
pathKey = "path"
formKey = "form"
headerKey = "header"
jsonKey = "json"
slash = "/"
colon = ':'
contentType = "Content-Type"
applicationJson = "application/json"
)
// ErrGetWithBody indicates that GET request with body.
var ErrGetWithBody = errors.New("HTTP GET should not have body")