Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/546669204/golang-http-do
模拟表单 GET POST 提交基于golang
https://github.com/546669204/golang-http-do
golang
Last synced: 12 days ago
JSON representation
模拟表单 GET POST 提交基于golang
- Host: GitHub
- URL: https://github.com/546669204/golang-http-do
- Owner: 546669204
- Created: 2018-02-07T06:22:02.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T03:17:23.000Z (over 6 years ago)
- Last Synced: 2024-11-07T11:23:45.513Z (2 months ago)
- Topics: golang
- Language: Go
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# golang-http-do
模拟表单 GET POST 提交基于golang把常用的模拟http提交函数 拎出来 方便维护 调用
#demo
```
op := httpdo.Default()
op.Url = fmt.Sprintf(`http://www.baidu.com`, d)
op.Header = `referer: https://www.baidu.com\ncookie: ssid=1465qw7e9wq87ewqew`
httpbyte, err := httpdo.HttpDo(op)
if err != nil {
log.Println(err)
}
log.Println(string(httpbyte))
```