Documentation
¶
Overview ¶
*
- http client implementation
- Rosbit Xu <me@rosbit.cn>
- Jan. 8, 2018
Index ¶
- func BaseItem(baseUrl string, weight ...uint) baseItem
- func FsCall(url string, method string, options ...*Args) (status int, body io.ReadCloser, err error)
- func FsCallAndParseJSON(url string, method string, res interface{}, options ...*Args) (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, params interface{}, header map[string]string, options ...Options) (status int, content []byte, resp *http.Response, err error)
- func HttpCall(url string, method string, postData interface{}, headers map[string]string) (int, io.ReadCloser, error)
- func HttpCallJ(url string, method string, postData interface{}, headers map[string]string, ...) (int, error)
- func JsonCall(url string, method string, jsonData interface{}, headers map[string]string) (int, io.ReadCloser, error)
- func JsonCallJ(url string, method string, jsonData interface{}, headers map[string]string, ...) (int, error)
- func ModTime(rawurl string) (time.Time, error)
- func PostJson(url, method string, params interface{}, header map[string]string, ...) (status int, content []byte, resp *http.Response, err error)
- func Wget(url, method string, params interface{}, header map[string]string, ...) (status int, content []byte, resp *http.Response, err error)
- type Args
- type BaseUrl
- func (b *BaseUrl) GetWithBody(uri string, params interface{}, header map[string]string, options ...Options) (status int, content []byte, resp *http.Response, err error)
- func (b *BaseUrl) HttpCall(uri, method string, params interface{}, header map[string]string, ...) (status int, content []byte, resp *http.Response, err error)
- func (b *BaseUrl) JsonCall(uri, method string, params interface{}, header map[string]string, ...) (status int, content []byte, resp *http.Response, err error)
- type File
- type FileInfo
- type FnCall
- type FnCallJ
- type HttpFunc
- type Options
- type Request
- func (wget *Request) GetUsingBodyParams(url string, params interface{}, header map[string]string) (status int, content []byte, resp *http.Response, err error)
- func (wget *Request) PostJson(url, method string, params interface{}, header map[string]string) (status int, content []byte, resp *http.Response, err error)
- func (wget *Request) Run(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 ¶ added in v1.4.1
func GetUsingBodyParams ¶
Types ¶
type Args ¶ added in v1.4.0
type Args struct {
Params interface{}
Headers map[string]string
Timeout int
JsonCall bool
Logger io.Writer
}
arguments for HTTP request
type BaseUrl ¶ added in v1.5.0
type BaseUrl struct {
// contains filtered or unexported fields
}
func NewBaseUrl ¶ added in v1.5.0
func (*BaseUrl) GetWithBody ¶ added in v1.5.0
type File ¶ added in v1.4.0
type File struct {
Result
// contains filtered or unexported fields
}
---- implementation of fs.File ----
func HttpRequest ¶ added in v1.4.1
type FileInfo ¶ added in v1.4.0
type FileInfo struct {
// contains filtered or unexported fields
}
---- implementation of fs.FileInfo ----
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewHttpsRequest ¶
func NewHttpsRequestWithCerts ¶ added in v1.0.3
func NewRequest ¶
func (*Request) GetUsingBodyParams ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.