Documentation ¶
Overview ¶
Package httputils implements HTTP related utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromConfig ¶
func FromConfig(c *configpb.HTTPRequest) (*http.Request, error)
NewRequest returns a new HTTP request object, with the given method, url, request body.
func NewRequest ¶
func NewRequest(method, url string, reqBody *RequestBody) (*http.Request, error)
NewRequest returns a new HTTP request object, with the given method, url, request body.
Types ¶
type RequestBody ¶
type RequestBody struct {
// contains filtered or unexported fields
}
RequestBody implements an HTTP request body.
func NewRequestBody ¶
func NewRequestBody(data ...string) *RequestBody
NewRequestBody returns a new RequestBody object.
func (*RequestBody) ContentType ¶
func (rb *RequestBody) ContentType() string
func (*RequestBody) Len ¶
func (rb *RequestBody) Len() int64
func (*RequestBody) Reader ¶
func (rb *RequestBody) Reader() io.ReadCloser
Click to show internal directories.
Click to hide internal directories.