Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

HttpWebRequest decodes my url?

Hey guys

I'm encoding my url so it becomes for example like this.

http://example.com?test=http%3A%2F%2Ftest.com%2fmytest

But when running it through a HttpWebRequest, it runs the url as
http://example.com?test=http://test.com/mytest

Has anyone had this issue before and how can I solve it?

Thanks!
(Nov 29, 2013 01:25 PM)Edward Kenway Wrote:  Hey guys

I'm encoding my url so it becomes for example like this.

http://example.com?test=http%3A%2F%2Ftest.com%2fmytest

But when running it through a HttpWebRequest, it runs the url as
http://example.com?test=http://test.com/mytest

Has anyone had this issue before and how can I solve it?

Thanks!

I haven't had any issues, try this:
HttpWebRequest r = (HttpWebRequest)WebRequest.Create(url);
New to trading cryptocurrencies but don't know where to start? Join Binance here! Binance is my favourite exchange for cryptocurrencies w/ low fees.

[Image: 793854efd3c9ee7d90ddd413ae9deed6.png]
I tried that.
But I fixed it, .NET 4.5 has WebRequest.CreateHttp(string)
which solves the issue.
Thanks for responding!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by HardStoNMay 2, 2021 12:59 AM 5 269 May 2, 2021 12:59 AM
Last Post: vaiperboy
[C#] by draxyeeSep 10, 2019 01:37 PM 12 396 Sep 10, 2019 01:37 PM
Last Post: MavenGradle
[.NET] by freesixJan 19, 2019 02:14 AM 13 502 Jan 19, 2019 02:14 AM
Last Post: StarZ