Skip to content

Commit 0504544

Browse files
committed
extend example HTTP UA to have repo ORL
1 parent c390def commit 0504544

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/misc.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package main
22

33
import (
44
"fmt"
5-
curl "github.com/andelf/go-curl"
65
"os"
76
"reflect"
7+
8+
curl "github.com/andelf/go-curl"
89
)
910

1011
const endl = "\n"
@@ -37,7 +38,7 @@ func main() {
3738
}
3839
//print("set url =>", ret.Setopt(curl.OPT_URL, "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux_x64/104547/chrome-linux.zip"), endl)
3940

40-
print("set user_agent =>", ret.Setopt(curl.OPT_USERAGENT, "go-curl v0.0.1") == nil, endl)
41+
print("set user_agent =>", ret.Setopt(curl.OPT_USERAGENT, "github.com/andelf/go-curl v0.0.1") == nil, endl)
4142
// add to DNS cache
4243
print("set resolve =>", ret.Setopt(curl.OPT_RESOLVE, []string{"www.baidu.com:8000:127.0.0.1"}) == nil, endl)
4344
// ret.EasyReset() clean seted

0 commit comments

Comments
 (0)