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
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user