Documentation ¶
Index ¶
- func FsCall(url string, method string, options ...Option) (status int, body io.ReadCloser, err error)
- func FsCallAndParseJSON(url string, method string, res interface{}, options ...Option) (status int, err error)
- func GetHeaders(resp *http.Response) map[string]string
- func GetLastModified(resp *http.Response) (time.Time, error)
- func GetStatus(resp *http.Response) (int, string)
- func GetUsingBodyParams(url string, options ...Option) (status int, content []byte, resp *http.Response, err error)
- func Http(url string, options ...Option) (status int, content []byte, resp *http.Response, err error)
- func HttpCall(url string, options ...Option) (int, io.ReadCloser, error)
- func HttpCallJ(url string, res interface{}, options ...Option) (int, error)
- func JSON(url string, options ...Option) (status int, content []byte, resp *http.Response, err error)
- func JSONCallJ(url string, res interface{}, options ...Option) (int, error)
- func JsonCall(url string, options ...Option) (int, io.ReadCloser, error)
- func ModTime(rawurl string) (modTim time.Time, err error)
- type BaseItemT
- type BaseUrl
- func (b *BaseUrl) GetWithBody(uri string, options ...Option) (status int, content []byte, resp *http.Response, err error)
- func (b *BaseUrl) Http(uri string, options ...Option) (status int, content []byte, resp *http.Response, err error)
- func (b *BaseUrl) JSON(uri string, options ...Option) (status int, content []byte, resp *http.Response, err error)
- type File
- type FileInfo
- type FnCall
- type FnCallJ
- type HttpFunc
- type Option
- func BasicAuth(userName, password string) Option
- func BodyLogger(writer io.Writer) Option
- func DontReadRespBody() Option
- func Headers(headers map[string]string) Option
- func JSONCall() Option
- func M(method string) Option
- func MultiBase(multiBase *BaseUrl) Option
- func Params(params interface{}) Option
- func WithCaCert(caCert []byte) Option
- func WithCaCertFile(caCertFile string) Option
- func WithTLSCertFiles(certPemFile, keyPemFile string) Option
- func WithTLSCerts(certPEMBlock, keyPEMBlock []byte) Option
- func WithTimeout(timeout int) Option
- func WithTimeoutDuration(timeout time.Duration) Option
- type Options
- type Request
- func (g *Request) GetClient() *http.Client
- func (g *Request) GetUsingBodyParams(url string, params interface{}, header map[string]string) (status int, content []byte, resp *http.Response, err error)
- func (g *Request) Http(url, method string, params interface{}, header map[string]string) (status int, content []byte, resp *http.Response, err error)
- func (g *Request) JSON(url, method string, params interface{}, header map[string]string) (status int, content []byte, resp *http.Response, err error)
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FsCallAndParseJSON ¶
func GetUsingBodyParams ¶
Types ¶
type BaseItemT ¶ added in v0.0.2
type BaseItemT struct {
// contains filtered or unexported fields
}
type BaseUrl ¶
type BaseUrl struct {
// contains filtered or unexported fields
}
func NewBaseUrl ¶
func NewBaseUrl2 ¶ added in v0.0.2
func (*BaseUrl) GetWithBody ¶
type File ¶
type File struct { Result // contains filtered or unexported fields }
---- implementation of fs.File ----
func HttpRequest ¶
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
---- implementation of fs.FileInfo ----
type Option ¶
type Option func(*Options)
func BodyLogger ¶
func DontReadRespBody ¶
func DontReadRespBody() Option
func WithCaCert ¶ added in v0.0.9
func WithCaCertFile ¶ added in v0.0.9
func WithTLSCertFiles ¶ added in v0.0.9
func WithTLSCerts ¶ added in v0.0.9
func WithTimeout ¶
func WithTimeoutDuration ¶ added in v0.0.13
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewHttpsRequest ¶
func NewRequest ¶
func (*Request) GetUsingBodyParams ¶
Click to show internal directories.
Click to hide internal directories.