Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeXLSX = "application/xlsx" ContentTypeOctetStream = "application/octet-stream" ContentTypeUrlencoded = "application/x-www-form-urlencoded" )
Variables ¶
This section is empty.
Functions ¶
func GetContentTypeBySuffix ¶
func RequestGet ¶
func RequestGet(reqInfo *HTTPRequest)
func RequestPOST ¶
func RequestPOST(reqInfo *HTTPRequest)
func StatusErrorMsg ¶
Types ¶
type HTTPRequest ¶
type HTTPRequest struct { URL string // The URL we just crawled UserAgent string //指定请求的UserAgent信息 ContentType string // Our content-type StatusCode int // HTTP code,错误时为-1 RequestBody []byte // The actual page content. Result []byte //请求结果 InnerErr error // The Error Message }
HTTPRequest 新的请求结构
Click to show internal directories.
Click to hide internal directories.