Documentation
¶
Index ¶
- type ImpHTTPClientEx
- type ImpHTTPClientService
- func (inst *ImpHTTPClientService) FetchBinary(ctx context.Context, url string, opt *service.HTTPClientOptions) ([]byte, *service.HTTPClientResult, error)
- func (inst *ImpHTTPClientService) FetchJSON(ctx context.Context, url string, obj any, opt *service.HTTPClientOptions) (*service.HTTPClientResult, error)
- func (inst *ImpHTTPClientService) FetchText(ctx context.Context, url string, opt *service.HTTPClientOptions) (string, *service.HTTPClientResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImpHTTPClientEx ¶ added in v0.1.2
type ImpHTTPClientEx struct { markup.Component `id:"HTTPClientExService"` HTTPClientService service.HTTPClientService `inject:"#HTTPClientService"` }
ImpHTTPClientEx ...
func (*ImpHTTPClientEx) FetchOnlineDoc ¶ added in v0.1.2
func (inst *ImpHTTPClientEx) FetchOnlineDoc(ctx context.Context, url string, opt *service.HTTPClientOptions) (*vo.Online, error)
FetchOnlineDoc ...
type ImpHTTPClientService ¶
type ImpHTTPClientService struct { markup.Component `id:"HTTPClientService"` AC application.Context `inject:"context"` FS service.FileSystemService `inject:"#FileSystemService"` MaxContentLength int `inject:"${wpm.httpclient.max-content-length}"` }
ImpHTTPClientService ....
func (*ImpHTTPClientService) FetchBinary ¶
func (inst *ImpHTTPClientService) FetchBinary(ctx context.Context, url string, opt *service.HTTPClientOptions) ([]byte, *service.HTTPClientResult, error)
FetchBinary 通过 HTTP 协议获取二进制数据
func (*ImpHTTPClientService) FetchJSON ¶
func (inst *ImpHTTPClientService) FetchJSON(ctx context.Context, url string, obj any, opt *service.HTTPClientOptions) (*service.HTTPClientResult, error)
FetchJSON 通过 HTTP 协议获取 JSON 对象
func (*ImpHTTPClientService) FetchText ¶
func (inst *ImpHTTPClientService) FetchText(ctx context.Context, url string, opt *service.HTTPClientOptions) (string, *service.HTTPClientResult, error)
FetchText 通过 HTTP 协议获取文本
Click to show internal directories.
Click to hide internal directories.