Skip to content

dial tcp 127.0.0.1:8088: Connection refused #512

Closed Answered by moorereason
gepengscu asked this question in Q&A
Discussion options

You must be logged in to vote

I can't replicate your claims:

$ go run .
try http get=========================
2022/01/11 18:46:54 Get "/v2/demo/ping": unsupported protocol scheme ""
exit status 1

What version of Go? Resty? Are you doing other things with the http package outside of this function? Can you provide a standalone reproducer (a simple main.go)?

I'm testing with Go v1.17.5, resty v2.7.0, and the following:

package main

import (
        "fmt"
        "io/ioutil"
        "log"
        "net/http"

        "github.com/go-resty/resty/v2"
)

func main() {
        fmt.Println("try http get=========================")
        r, err := http.Get("/v2/demo/ping")
        if err != nil {
                log.Fatal(err)…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by gepengscu
Comment options

You must be logged in to vote
1 reply
@shynome
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants