Documentation ¶
Index ¶
- Variables
- func CurlHttpStatusCodeParser(source string) (string, error)
- func ParseHTTPHeaders(source string) map[string][]string
- type Config
- type CurlHttp
- type CurlRequest
- func (c *CurlRequest) AddHeader(name string, value []string)
- func (c *CurlRequest) Body() io.Reader
- func (c *CurlRequest) Compressed() bool
- func (c *CurlRequest) Cookies() map[string]string
- func (c *CurlRequest) DisableCompression()
- func (c *CurlRequest) EnableCompression()
- func (c *CurlRequest) HTTP1()
- func (c *CurlRequest) HTTP2()
- func (c *CurlRequest) HTTP3()
- func (c *CurlRequest) HTTPVersion() string
- func (c *CurlRequest) Headers() map[string][]string
- func (c *CurlRequest) Method() string
- func (c *CurlRequest) SetBody(reader io.Reader)
- func (c *CurlRequest) SetCookies(cookies map[string]string)
- func (c *CurlRequest) SetMethod(method string)
- func (c *CurlRequest) SetURL(url string)
- func (c *CurlRequest) SetUserAgent(useragent string)
- func (c *CurlRequest) Url() string
- func (c *CurlRequest) UserAgent() string
- type CurlResponse
- type FxCurlHttpParams
- type HTTPStatusCodeParser
- type NewCurlHttpParams
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("curl", fx.Provide(FxNewCurlHttp))
Functions ¶
func ParseHTTPHeaders ¶
Types ¶
type CurlHttp ¶
func FxNewCurlHttp ¶
func FxNewCurlHttp(p FxCurlHttpParams) *CurlHttp
func NewCurlHttp ¶
func NewCurlHttp(p NewCurlHttpParams) *CurlHttp
type CurlRequest ¶
type CurlRequest struct {
// contains filtered or unexported fields
}
func (*CurlRequest) AddHeader ¶
func (c *CurlRequest) AddHeader(name string, value []string)
func (*CurlRequest) Body ¶
func (c *CurlRequest) Body() io.Reader
func (*CurlRequest) Compressed ¶
func (c *CurlRequest) Compressed() bool
func (*CurlRequest) Cookies ¶
func (c *CurlRequest) Cookies() map[string]string
func (*CurlRequest) DisableCompression ¶
func (c *CurlRequest) DisableCompression()
func (*CurlRequest) EnableCompression ¶
func (c *CurlRequest) EnableCompression()
func (*CurlRequest) HTTP1 ¶
func (c *CurlRequest) HTTP1()
func (*CurlRequest) HTTP2 ¶
func (c *CurlRequest) HTTP2()
func (*CurlRequest) HTTP3 ¶
func (c *CurlRequest) HTTP3()
func (*CurlRequest) HTTPVersion ¶
func (c *CurlRequest) HTTPVersion() string
func (*CurlRequest) Headers ¶
func (c *CurlRequest) Headers() map[string][]string
func (*CurlRequest) Method ¶
func (c *CurlRequest) Method() string
func (*CurlRequest) SetBody ¶
func (c *CurlRequest) SetBody(reader io.Reader)
func (*CurlRequest) SetCookies ¶
func (c *CurlRequest) SetCookies(cookies map[string]string)
func (*CurlRequest) SetMethod ¶
func (c *CurlRequest) SetMethod(method string)
func (*CurlRequest) SetURL ¶
func (c *CurlRequest) SetURL(url string)
func (*CurlRequest) SetUserAgent ¶
func (c *CurlRequest) SetUserAgent(useragent string)
func (*CurlRequest) Url ¶
func (c *CurlRequest) Url() string
func (*CurlRequest) UserAgent ¶
func (c *CurlRequest) UserAgent() string
type CurlResponse ¶
type CurlResponse struct {
// contains filtered or unexported fields
}
func (*CurlResponse) Body ¶
func (c *CurlResponse) Body() io.Reader
func (*CurlResponse) Headers ¶
func (c *CurlResponse) Headers() map[string][]string
func (*CurlResponse) HttpCode ¶
func (c *CurlResponse) HttpCode() string
type HTTPStatusCodeParser ¶
type NewCurlHttpParams ¶
Click to show internal directories.
Click to hide internal directories.