http

package
v0.0.0-...-41edef4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TcbAPI = "https://tcb-api.tencentcloudapi.com"

Cloudbase Open API 服务地址 https://docs.cloudbase.net/api-reference/openapi/introduction.html

Functions

func TestSign

func TestSign() (s string, authorization string, err error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient(ctx *context.Context) (client *Client)

获取实例

func (*Client) HttpDeleteJson

func (c *Client) HttpDeleteJson(path string, params string, headers ...map[string]string) (body string, err error)

DELETE

func (*Client) HttpGetJson

func (c *Client) HttpGetJson(path string, params url.Values, headers ...map[string]string) (body string, err error)

GET

func (*Client) HttpPUTJson

func (c *Client) HttpPUTJson(path string, params string, headers ...map[string]string) (body string, err error)

PUT

func (*Client) HttpPatchJson

func (c *Client) HttpPatchJson(path string, params string, headers ...map[string]string) (body string, err error)

PATCH

func (*Client) HttpPostJson

func (c *Client) HttpPostJson(path string, params string, headers ...map[string]string) (body string, err error)

POST

func (*Client) SetAuthorizationHeader

func (c *Client) SetAuthorizationHeader(authorizationHeader string)

authorizationHeader

func (*Client) SetSessionTokenHeader

func (c *Client) SetSessionTokenHeader(sessionTokenHeader string)

sessionTokenHeader

func (*Client) SetTimeStampHeader

func (c *Client) SetTimeStampHeader(timeStampHeader string)

timeStampHeader

func (*Client) SetVersion

func (c *Client) SetVersion(version string)

version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL