return ErrBodylessRequest on get method etc.

This commit is contained in:
kevin
2020-08-12 14:31:11 +08:00
committed by kingxt
parent 9428fface2
commit 05c8dd0b9c
3 changed files with 30 additions and 1 deletions

23
rest/httpx/vars.go Normal file
View File

@@ -0,0 +1,23 @@
package httpx
import "errors"
const (
ApplicationJson = "application/json"
ContentEncoding = "Content-Encoding"
ContentSecurity = "X-Content-Security"
ContentType = "Content-Type"
KeyField = "key"
SecretField = "secret"
TypeField = "type"
CryptionType = 1
)
const (
CodeSignaturePass = iota
CodeSignatureInvalidHeader
CodeSignatureWrongTime
CodeSignatureInvalidToken
)
var ErrBodylessRequest = errors.New("not a POST|PUT|PATCH request")