Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy With Authentication #152

Open
Tracked by #16 ...
vijaygiri10 opened this issue Aug 29, 2017 · 2 comments
Open
Tracked by #16 ...

Proxy With Authentication #152

vijaygiri10 opened this issue Aug 29, 2017 · 2 comments

Comments

@vijaygiri10
Copy link

Hi,

I am trying , proxy with Authentication

But I am getting error -- Proxy Authentication Required

Link of my code .
https://gist.github.com/vijaygiri10/4611eb4bab1fcc858a2565f49ba19bed

Regards
Vijay

@vijaygiri10 vijaygiri10 changed the title Proxy Authentication Required Proxy With Authentication Aug 29, 2017
@yoazmenda
Copy link

Hi @vijaygiri10,

any progression regarding this issue?
have you eventually managed to use gorequest with proxy authentication?

Thanks

@ta1bbty
Copy link

ta1bbty commented Feb 7, 2019

Hi @yoazmenda and @vijaygiri10 it worked for me, here's the code snippet.
I just sdded Proxy in the client initialization itself.

client := gorequest.New().
	Timeout(5 * time.Second).
	Proxy("http://proxy_host:proxy_port").
	TLSClientConfig(&tls.Config{InsecureSkipVerify: true})

ProxyAuth := "Basic base64encodedStringHere"

resp, body, errs := client.Get(url).
	Set("User-Agent", useragent).
	Set("Proxy-Authorization", ProxyAuth).
	End()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants