Documentation ¶
Index ¶
- func AddMime(reqest *http.Request, mime string)
- func ComputeEtag(data []byte) (etag string)
- func ComputeFileEtag(filename string) (etag string, err error)
- func CreateGetRequest(url string) (request *http.Request, err error)
- func CreatePostRequest(url string) (request *http.Request, err error)
- func GetUuid() (uuid string)
- func MakeQuery(v url.Values) string
- func SetUserAgent(ua string)
- func StdEncodeString(str string) string
- func UrlSafeEncode(data []byte) string
- func UrlSafeEncodePair(bucket string, key string) string
- func UrlSafeEncodeString(str string) string
- type Auth
- type HttpManager
- func (http_manager *HttpManager) Do(reqest *http.Request) (response *http.Response, err error)
- func (this *HttpManager) DoWithAuth(reqest *http.Request, auth *Auth) (response *http.Response, err error)
- func (this *HttpManager) DoWithToken(reqest *http.Request, token string) (response *http.Response, err error)
- func (http_manager *HttpManager) GetClient() (client *http.Client)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeEtag ¶
func ComputeFileEtag ¶
func SetUserAgent ¶
func SetUserAgent(ua string)
func StdEncodeString ¶
func UrlSafeEncode ¶
func UrlSafeEncodePair ¶
func UrlSafeEncodeString ¶
Types ¶
type Auth ¶
func (*Auth) CreateUploadToken ¶
/ <summary> / 生成上传凭证 / https://wcs.chinanetcenter.com/document/API/Token/UploadToken / https://wcs.chinanetcenter.com/document/Tools/GenerateUploadToken / </summary> / <param name="putPolicy">上传策略,JSON 字符串</param> / <returns>上传凭证</returns>
func (*Auth) SignWithData ¶
type HttpManager ¶
type HttpManager struct {
// contains filtered or unexported fields
}
func NewDefaultHttpManager ¶
func NewDefaultHttpManager() (http_manager *HttpManager)
func NewHttpManager ¶
func NewHttpManager(client *http.Client) (http_manager *HttpManager)
func (*HttpManager) DoWithAuth ¶
func (*HttpManager) DoWithToken ¶
func (*HttpManager) GetClient ¶
func (http_manager *HttpManager) GetClient() (client *http.Client)
Click to show internal directories.
Click to hide internal directories.