Documentation
¶
Index ¶
- func CopyHeaders(dest map[string][]string, source map[string][]string)
- func CopyMap(dest map[string]any, source map[string]any)
- func GetReqHeaders(req *http.Request) map[string][]string
- func GetResHeaders(res *http.Response) map[string][]string
- func ParseHeaders(headers map[string][]string) map[string]any
- func ParseReqURL(req *http.Request) (*url.URL, error)
- func ReadReqBody(req *http.Request) ([]byte, error)
- func ReadResBody(res *http.Response) ([]byte, error)
- type Body
- type BodyType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyHeaders ¶ added in v0.0.8
Copies source headers into destination (deep copy)
func GetReqHeaders ¶
Get headers from request
func GetResHeaders ¶ added in v0.0.5
Get headers from response
func ParseHeaders ¶
Parse headers into `map[string]any`
func ParseReqURL ¶ added in v0.0.5
Outputs a URL object with fields populated from the request
func ReadReqBody ¶ added in v0.0.5
Read body from request
Types ¶
type Body ¶
func GetResBody ¶ added in v0.0.5
Get body from response
func (*Body) EnsureNotNil ¶ added in v0.0.9
func (body *Body) EnsureNotNil()
Ensure `body.Data` is never nil and instead just empty `map[string]any{}`
func (*Body) Reevaluate ¶ added in v0.0.9
func (body *Body) Reevaluate()
Reevaluates body sets `body.Empty` according to value of `body.Data`
func (*Body) ReevaluateRawBytes ¶ added in v0.0.9
func (body *Body) ReevaluateRawBytes()
Reevaluates `body.Raw` by serializing `body.Data` as json string and then using the byte value
Click to show internal directories.
Click to hide internal directories.