Documentation
¶
Index ¶
- func Build(b *builder) (*http.Request, error)
- func NewBuilder(method string) *builder
- type Option
- func BaseUrl(v string) Option
- func Body(v *io.Reader) Option
- func BodyBytes(v []byte) Option
- func BodyString(v string) Option
- func Context(v context.Context) Option
- func Cookie(v *http.Cookie) Option
- func Header(k, v string) Option
- func Host(v string) Option
- func Path(v string, args ...interface{}) Option
- func Port(v int) Option
- func PortString(v string) Option
- func Query(k, v string) Option
- func Scheme(v string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBuilder ¶
func NewBuilder(method string) *builder
Types ¶
type Option ¶
type Option = func(*builder)
Option is a function that modifies the builder.
func BodyString ¶
BodyString sets the body of the request from a string.
func PortString ¶
PortString sets the port for the request as a string.
Click to show internal directories.
Click to hide internal directories.