Documentation ¶ Index ¶ type Params type Response func Delete(url string, params *Params) (*Response, error) func Get(url string, params *Params) (*Response, error) func Post(url string, params *Params) (*Response, error) func Put(url string, params *Params) (*Response, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Params ¶ type Params struct { // Header 参数会被添加到请求header当中 Header map[string]string // Form 参数会被格式化到url当中 Form map[string]string // Body 参数会被序列化成json字符串 Body interface{} // Cookit 参数会被添加到请求cookie当中 Cookie map[string]string } type Response ¶ type Response struct { // 返回状态码 StatusCode int // 返回body数组,[]byte Body []byte } func Delete ¶ func Delete(url string, params *Params) (*Response, error) func Get ¶ func Get(url string, params *Params) (*Response, error) func Post ¶ func Post(url string, params *Params) (*Response, error) func Put ¶ func Put(url string, params *Params) (*Response, error) Source Files ¶ View all Source files request.go Click to show internal directories. Click to hide internal directories.