针对表单上传的优化

This commit is contained in:
Yun
2023-11-24 22:19:59 +08:00
parent ebc1905cb4
commit 3a0e1c155a
4 changed files with 80 additions and 64 deletions
-25
View File
@@ -18,32 +18,7 @@ import (
* Date: 2023年7月12日11:35:01
*/
type dataType string
const (
DataTypeForm dataType = "form"
DataTypeJson dataType = "json"
DataTypeXml dataType = "xml"
DataTypeEncode dataType = "encode"
DataTypeText dataType = "text"
DataTypeUrlEncoded dataType = "urlencode"
)
type method string
const (
MethodGet method = "GET"
MethodPost method = "POST"
)
type CurlParams struct {
Url string
Method method // GET/POST
Params interface{}
Headers map[string]interface{}
Cookies interface{}
DataType dataType // FORM,JSON,XML
}
var (
// 默认的transport