Fetch the repository succeeded.
package client
// GetContent is a convenience method for sending GET request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) GetContent(url string, data ...interface{}) string {
return string(c.RequestBytes("GET", url, data...))
}
// PutContent is a convenience method for sending PUT request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) PutContent(url string, data ...interface{}) string {
return string(c.RequestBytes("PUT", url, data...))
}
// PostContent is a convenience method for sending POST request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) PostContent(url string, data ...interface{}) string {
return string(c.RequestBytes("POST", url, data...))
}
// DeleteContent is a convenience method for sending DELETE request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) DeleteContent(url string, data ...interface{}) string {
return string(c.RequestBytes("DELETE", url, data...))
}
// HeadContent is a convenience method for sending HEAD request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) HeadContent(url string, data ...interface{}) string {
return string(c.RequestBytes("HEAD", url, data...))
}
// PatchContent is a convenience method for sending PATCH request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) PatchContent(url string, data ...interface{}) string {
return string(c.RequestBytes("PATCH", url, data...))
}
// ConnectContent is a convenience method for sending CONNECT request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) ConnectContent(url string, data ...interface{}) string {
return string(c.RequestBytes("CONNECT", url, data...))
}
// OptionsContent is a convenience method for sending OPTIONS request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) OptionsContent(url string, data ...interface{}) string {
return string(c.RequestBytes("OPTIONS", url, data...))
}
// TraceContent is a convenience method for sending TRACE request, which retrieves and returns
// the result content and automatically closes response object.
func (c *Client) TraceContent(url string, data ...interface{}) string {
return string(c.RequestBytes("TRACE", url, data...))
}
// RequestContent is a convenience method for sending custom http method request, which
// retrieves and returns the result content and automatically closes response object.
func (c *Client) RequestContent(method string, url string, data ...interface{}) string {
return string(c.RequestBytes(method, url, data...))
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。