Skip to content

Commit

Permalink
feat(x/http/get): Using libuv to speed up http.Get()
Browse files Browse the repository at this point in the history
  • Loading branch information
spongehah committed Aug 1, 2024
1 parent 5a97ec9 commit 22d0b9f
Show file tree
Hide file tree
Showing 8 changed files with 329 additions and 371 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/goplus/llgoexamples

go 1.20

require github.com/goplus/llgo v0.9.4-0.20240729010130-b3b4f55c68f0
require github.com/goplus/llgo v0.9.5-0.20240731053840-36072584d0be
12 changes: 2 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
github.com/goplus/llgo v0.9.0 h1:yaJzQperGUafEaHc9VlVQVskIngacoTNweEXY0GRi0Q=
github.com/goplus/llgo v0.9.0/go.mod h1:M3UwiYdPZFyx7m2J0+6Ti1dYVA3uOO1WvSBocuE8N7M=
github.com/goplus/llgo v0.9.1-0.20240709104849-d6a38a567fda h1:UIPwlgzCb8dV/7WFMyprhZuq8CSLAQIqwFpH5AhrNOM=
github.com/goplus/llgo v0.9.1-0.20240709104849-d6a38a567fda/go.mod h1:zsrtWZapL4aklZc99xBSZRynGzLTIT1mLRjP0VSn9iw=
github.com/goplus/llgo v0.9.1-0.20240712060421-858d38d314a3 h1:2fZ2zQ8S58KvOsJTx6s6MHoi6n1K4sqQwIbTauMrgEE=
github.com/goplus/llgo v0.9.1-0.20240712060421-858d38d314a3/go.mod h1:zsrtWZapL4aklZc99xBSZRynGzLTIT1mLRjP0VSn9iw=
github.com/goplus/llgo v0.9.3-0.20240726020431-98d075728f2b h1:z9FUoeAALL5ytBhhGhE1dXm4+L1Q2eMUTcfiqLAZgf8=
github.com/goplus/llgo v0.9.3-0.20240726020431-98d075728f2b/go.mod h1:zsrtWZapL4aklZc99xBSZRynGzLTIT1mLRjP0VSn9iw=
github.com/goplus/llgo v0.9.4-0.20240729010130-b3b4f55c68f0 h1:02gSx3Oj3cLlBMed+9IWBUGHThEZMnCNiR67yaQbpqo=
github.com/goplus/llgo v0.9.4-0.20240729010130-b3b4f55c68f0/go.mod h1:zsrtWZapL4aklZc99xBSZRynGzLTIT1mLRjP0VSn9iw=
github.com/goplus/llgo v0.9.5-0.20240731053840-36072584d0be h1:FTALxA3ivIeVRAO93e1hCSCLaPbjKn+RZx40p5lx8KE=
github.com/goplus/llgo v0.9.5-0.20240731053840-36072584d0be/go.mod h1:zsrtWZapL4aklZc99xBSZRynGzLTIT1mLRjP0VSn9iw=
11 changes: 9 additions & 2 deletions x/http/_demo/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ import (

func main() {
// 使用 http.Get 发送 GET 请求
resp := http.Get("https://www.baidu.com/")
resp, err := http.Get("https://www.baidu.com/")
if err != nil {
fmt.Println(err)
return
}
fmt.Println(resp.Status)
fmt.Println(resp.StatusCode)
resp.PrintHeaders()
fmt.Println()
resp.PrintBody()
resp.PrintBody2()

resp.PrintBody1()
defer resp.Content.Close()
}
141 changes: 0 additions & 141 deletions x/http/_demo/test.go

This file was deleted.

Loading

0 comments on commit 22d0b9f

Please sign in to comment.