Documentation ¶
Index ¶
Constants ¶
View Source
const (
// HeaderContentType the Content-Type http header
HeaderContentType = "Content-Type"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpClient ¶ added in v0.6.1
type HttpClient interface { // HttpGet get http resource HttpGet(url string) (resp *http.Response, err error) // HttpGetWithCookie get http resource with cookies HttpGetWithCookie(url string, header http.Header, cookies ...*http.Cookie) (resp *http.Response, err error) // HttpPost send a post request with form data HttpPost(url string, data url.Values) (resp *http.Response, err error) // HttpPostWithCookie send a post request with form data and cookies HttpPostWithCookie(url string, data url.Values, cookies ...*http.Cookie) (resp *http.Response, err error) // HttpPostFileChunkWithCookie send a post request with form data, a file chunk and cookies HttpPostFileChunkWithCookie(url string, fieldName string, fileName string, data url.Values, chunk []byte, cookies ...*http.Cookie) (resp *http.Response, err error) // HttpPostWithoutRedirect send a post request with form data and not auto redirect HttpPostWithoutRedirect(url string, data url.Values) (resp *http.Response, err error) }
HttpClient an HTTP client component that supports chunked file uploads using the POST method
func NewHttpClient ¶ added in v0.6.1
func NewHttpClient(insecureSkipVerify bool, certFile string, enableHTTP3 bool) (HttpClient, error)
NewHttpClient create a http client
Click to show internal directories.
Click to hide internal directories.