Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetArgsToken ¶
TODO 考虑转义 TODO 各种换行符号
Types ¶
type Curl ¶
type Curl struct { Method string `clop:"-X; --request" usage:"Specify request command to use"` Get bool `clop:"-G; --get" usage:"Put the post data in the URL and use GET"` Header []string `clop:"-H; --header" usage:"Pass custom header(s) to server"` Data string `clop:"-d; --data" usage:"HTTP POST data"` DataRaw string `clop:"--data-raw" usage:"HTTP POST data, '@' allowed"` Form []string `clop:"-F; --form" usage:"Specify multipart MIME data"` URL2 string `clop:"args=url2" usage:"url2"` URL string `clop:"--url" usage:"URL to work with"` Location bool `clop:"-L; --location" usage:"Follow redirects"` //TODO DataUrlencode []string `clop:"--data-urlencode" usage:"HTTP POST data url encoded"` Compressed bool `clop:"--compressed" usage:"Request compressed response"` Insecure bool `clop:"-k; --insecure" "Allow insecure server connections when using SSL"` Err error // contains filtered or unexported fields }
Curl结构体
func ParseSlice ¶
ParseSlice和ParseString的区别,ParseSlice里面保存解析好的curl表达式
func ParseString ¶
ParseString是链式API结构, 如果要拿*http.Request,后接Request()即可
Click to show internal directories.
Click to hide internal directories.