I am trying to list all my customers in stripe and I am getting this error:
2018/08/14 19:14:21 Requesting GET api.stripe.com/v1/customers 2018/08/14 19:14:21 http: proxy error: dial tcp [::1]:3001:
getsockopt: connection refused
The code snippet I am using is:
stripe.Key = "sk_test_abc123"
params := &stripe.CustomerListParams{}
params.Filters.AddFilter("limit", "", "3")
i := customer.List(params)
for i.Next() {
c := i.Customer()
fmt.Printf("customer is..
%v", c)
}
I removed my stripe private test key ofcourse in the above snippet.
Why would I be getting this type of error? Is it my laptops firewall or something?
Update
It seems the issue is because I am using https://github.com/codegangsta/gin for live reloading. Is there a way to get this to work?
I just ran my go project by doing:
go build
./proj-name
And the API called worked fine.