Documentation ¶
Index ¶
- Variables
- func MarshalHeaders(v any) (data http.Header, err error)
- func MarshalJson(v any) (str string, err error)
- func MarshalQuery(v any) (s string, err error)
- func UnmarshalHeaders(data http.Header, v any) (err error)
- type Builder
- func (rb *Builder) Body(body []byte) *Builder
- func (rb *Builder) BodyForm(object any) *Builder
- func (rb *Builder) BodyJson(object any) *Builder
- func (rb *Builder) BodyReader(reader io.Reader) *Builder
- func (rb *Builder) Build() *Request
- func (rb *Builder) BuildURL() (u *url.URL)
- func (rb *Builder) Header(object any) *Builder
- func (rb *Builder) HeaderAdd(key string, value string) *Builder
- func (rb *Builder) HeaderUpdate(header http.Header) *Builder
- func (rb *Builder) Host(host string) *Builder
- func (rb *Builder) Method(method string) *Builder
- func (rb *Builder) Path(path string) *Builder
- func (rb *Builder) Query(object any) *Builder
- func (rb *Builder) QueryString(query string) *Builder
- func (rb *Builder) Scheme(scheme string) *Builder
- func (rb *Builder) Url(us string) *Builder
- type Conn
- type ConnConfig
- type Request
- func (req *Request) Send() (resp *http.Response, err error)
- func (req *Request) WantBody() (body []byte, err error)
- func (req *Request) WantJson(v any) error
- func (req *Request) WithContext(ctx context.Context) *Request
- func (req *Request) WithHost(host string) *Request
- func (req *Request) WithProxyTransport(us string) *Request
- func (req *Request) WithTransport(transport http.RoundTripper) *Request
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyBody = errors.New("empty body")
Functions ¶
func MarshalJson ¶
func MarshalQuery ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) HeaderUpdate ¶ added in v1.0.2
func (*Builder) QueryString ¶
type ConnConfig ¶ added in v1.1.0
type Request ¶ added in v1.0.1
func (*Request) WithContext ¶ added in v1.0.6
func (*Request) WithProxyTransport ¶ added in v1.0.6
func (*Request) WithTransport ¶ added in v1.0.6
func (req *Request) WithTransport(transport http.RoundTripper) *Request
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
httpheader
Package httpheader implements encoding of structs into http.Header fields.
|
Package httpheader implements encoding of structs into http.Header fields. |
query
Package query implements encoding of structs into URL query parameters.
|
Package query implements encoding of structs into URL query parameters. |
Click to show internal directories.
Click to hide internal directories.