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

HTTPRequest with proxy #2373

Open
hackerboy1337 opened this issue Sep 29, 2019 · 0 comments
Open

HTTPRequest with proxy #2373

hackerboy1337 opened this issue Sep 29, 2019 · 0 comments

Comments

@hackerboy1337
Copy link

hackerboy1337 commented Sep 29, 2019

I'm trying to use proxies for http requests with the vibe.d library like this:

HTTPClientSettings settings = new HTTPClientSettings;
settings.proxyURL = URL.parse("http://gb.smartproxy.com:30000");
auto response = requestHTTP("https://dlang.org", (scope req) {
    req.method = HTTPMethod.GET;
}, settings).bodyReader.readAllUTF8;

writeln(response);
As soon as I enable the proxy settings I get errors like this on pretty much every site with:

<title>302 Found</title>

Found

The document has moved here.

It works fine when I do it in python with the requests library with the same proxies

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

1 participant