Thanks for your answer. At first glance the code looks good, but
unfortunately it doesn't work :(
When getting a page from localhost or 127.0.0.1 (just like in your
code) I get the following error:
panic: Get
http://127.0.0.1:80: dial tcp
127.0.0.1:80: cannot assign
requested address
When getting a page from a remote server (yes I have tried several) I
get the following error:
panic: Get
http://www.google.com/: dial tcp
173.194.39.84:80: invalid
argument
On Jun 2, 12:22 am, dmit <
dmitr...@gmail.com> wrote:
> What you need is a way for http.Client to use a custom Dial() function
> based on net.DialTCP() which takes the local address as an argument. That
> can be done by overriding the default http.Transport:
http://play.golang.org/p/iTBLLk4YhL
>
> Would something like that work for you?
>
>
>
>
>
>
>
> On Friday, June 1, 2012 7:47:48 PM UTC+3, Julian wrote:
>