Skip to content

Can Vibe.d use a proxy to download files? #2817

@GoogleIsEvil

Description

@GoogleIsEvil

If not could it be added. I'd like to download files through a proxy.

Best I could find is a settings.proxyURL to specify the url but this does't seem to exist any more:

https://stackoverflow.com/questions/58152049/vibe-d-httprequest-with-proxy

I've tried stuff like:

void dl()(string url, string filename)
{
HTTPClient client = new HTTPClient();
HTTPClientSettings settings = new HTTPClientSettings;
settings.proxyURL = URL.parse("http://127.0.0.1:18080");

download(url, (scope input){
	auto fil = openFile(filename, FileMode.createTrunc);
	scope(exit) fil.close();
	fil.write(input);
}, settings);

//download(url, filename);

}

but to no avail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions