You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
263 B
27 lines
263 B
1 month ago
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"github.com/tangchen2018/go-utils/http"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
|
||
|
req := http.New(
|
||
|
http.WithUrl("http://www.baidu.com"),
|
||
|
)
|
||
|
|
||
|
if err := req.Do(); err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
fmt.Println(string(req.Result))
|
||
|
}
|
||
|
```
|