jamietre / CsQuery

CsQuery is a complete CSS selector engine, HTML parser, and jQuery port for C# and .NET 4.
Other
1.16k stars 250 forks source link

Please add proxy config #161

Open HiradNikoo opened 10 years ago

HiradNikoo commented 10 years ago

Hi!

I love the library. The only issue is that it doesn't seem to have a proxy config to load the url from a proxy. It would really be great if you could add this config.

HiradNikoo commented 10 years ago

Although it could be achieved by WebClient. But it really would be nice if it could have it built-in.

jamietre commented 10 years ago

I'm probably not going to do this because it's a fairly low priority and has workarounds. But I'm glad to accept pull requests if anyone else wants to make the changes.

ctindex commented 9 years ago

Could somebody please provide an example using WebClient.Proxy and CQ.CreateFromUrlAsync()?

(I'm using VB.NET) this is the way I am accessing an uri CQ.CreateFromUrlAsync(uri, AddressOf WhenFinishedAction, AddressOf WhenFailedAction, conf)

But I need a proxy.

Dim request As CsqWebRequest = New CsQuery.Web.CsqWebRequest(uri)
Dim httpRequest As IHttpWebRequest = request.GetWebRequest()

I could set a proxy to httpRequest, but don't know where to put httpRequest for doing an asynchronous request with success and error handlers.