Skip to content

Commit

Permalink
fix: http_test.go url not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong Liu committed Jan 16, 2024
1 parent 1d8f6d2 commit ae2038e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions utils/requests/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ import (

func TestGet(t *testing.T) {
headers := map[string]string{}
data, statusCode, err := Get("https://ifconfig.me/method", headers)
_, statusCode, err := Get("https://httpbin.org/get", headers)
if err != nil {
log.Println(err.Error())
}
if statusCode != 200 {
t.Errorf("Get method expected 200 OK, but %d got", statusCode)
}
if string(data) != "GET" {
t.Errorf("Get method expected GET, but %s got", data)
}
}

type Body struct {
Expand Down

0 comments on commit ae2038e

Please sign in to comment.