Documentation
¶
Index ¶
- Variables
- type IRequest
- type IRequestBuilder
- type SRequest
- func (p *SRequest) Build() IRequest
- func (p *SRequest) GetBody() []byte
- func (p *SRequest) GetHead() map[string]string
- func (p *SRequest) GetHost() string
- func (p *SRequest) GetMethod() string
- func (p *SRequest) GetPath() string
- func (p *SRequest) ToBytes() []byte
- func (p *SRequest) ToString() string
- func (p *SRequest) WithBody(pBody []byte) IRequestBuilder
- func (p *SRequest) WithHead(pHead map[string]string) IRequestBuilder
- func (p *SRequest) WithHost(pHost string) IRequestBuilder
- func (p *SRequest) WithMethod(pMethod string) IRequestBuilder
- func (p *SRequest) WithPath(pPath string) IRequestBuilder
- type SRequestBlock
- type SRequestError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLoadBytesJoiner = &SRequestError{"load bytes joiner"} ErrDecodeRequest = &SRequestError{"decode request"} ErrUnknownType = &SRequestError{"unknown type"} )
Functions ¶
This section is empty.
Types ¶
type IRequest ¶
type IRequest interface { types.IConverter GetMethod() string GetHost() string GetPath() string GetHead() map[string]string GetBody() []byte }
func LoadRequest ¶
type IRequestBuilder ¶ added in v1.7.7
type IRequestBuilder interface { Build() IRequest WithMethod(string) IRequestBuilder WithHost(string) IRequestBuilder WithPath(string) IRequestBuilder WithHead(map[string]string) IRequestBuilder WithBody([]byte) IRequestBuilder }
func NewRequestBuilder ¶ added in v1.7.7
func NewRequestBuilder() IRequestBuilder
type SRequest ¶
type SRequest struct { SRequestBlock FBody []byte `json:"body,omitempty"` }
func (*SRequest) WithBody ¶
func (p *SRequest) WithBody(pBody []byte) IRequestBuilder
func (*SRequest) WithHost ¶
func (p *SRequest) WithHost(pHost string) IRequestBuilder
func (*SRequest) WithMethod ¶
func (p *SRequest) WithMethod(pMethod string) IRequestBuilder
func (*SRequest) WithPath ¶
func (p *SRequest) WithPath(pPath string) IRequestBuilder
type SRequestBlock ¶
type SRequestError ¶
type SRequestError struct {
// contains filtered or unexported fields
}
func (*SRequestError) Error ¶
func (err *SRequestError) Error() string
Click to show internal directories.
Click to hide internal directories.