Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMethodEmpty = errors.New("method is empty") ErrURLEmpty = errors.New("url is empty") )
Functions ¶
Types ¶
type MarshalError ¶
type MarshalError struct {
Err error
// contains filtered or unexported fields
}
func (MarshalError) Body ¶ added in v0.2.0
func (e MarshalError) Body() any
func (MarshalError) Error ¶
func (e MarshalError) Error() string
func (MarshalError) Unwrap ¶ added in v0.2.0
func (e MarshalError) Unwrap() error
type MethodSender ¶ added in v0.2.0
type Middleware ¶
type PayloadSender ¶
type Receiver ¶
type Receiver interface {
Response() *http.Response
Status() string
StatusCode() int
Proto() string
ProtoMajor() int
ProtoMinor() int
ContentLength() int64
TransferEncoding() []string
Headers() http.Header
Trailers() http.Header
Cookies() []*http.Cookie
BytesBody() ([]byte, error)
TextBody() (string, error)
ObjectBody(body any, unmarshal func([]byte, any) error) error
JSONBody(body any) error
XMLBody(body any) error
ProtobufBody(body proto.Message) error
GobBody(body any) error
WriterBody(file io.Writer) error
}
type URLSender ¶
type URLSender interface {
URL(uri *url.URL) PayloadSender
URLString(urlString string) PayloadSender
}
func Connect ¶
func Connect() URLSender
Connect returns a new RequestSender with the method CONNECT.
type UnmarshalError ¶
type UnmarshalError struct {
// contains filtered or unexported fields
}
func (UnmarshalError) Body ¶
func (e UnmarshalError) Body() []byte
func (UnmarshalError) Error ¶
func (e UnmarshalError) Error() string
func (UnmarshalError) Unwrap ¶ added in v0.2.0
func (e UnmarshalError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.