Mono - Uri class

Posted by Jonathan.Peppers on Stack Overflow See other posts from Stack Overflow or by Jonathan.Peppers
Published on 2011-01-09T23:37:04Z Indexed on 2011/01/09 23:53 UTC
Read the original article Hit count: 285

Filed under:
|
|
|

I am making an HttpWebRequest at a url similar to this:

"http://mysite.com/search?query=my+search+string"

Problem is, the Uri class escapes it with %, and the site I'm making the request against can't handle the escaped characters. (I have no control to fix the site)

So tried this [Obsolete] constructor:

new Uri(myUriString, true);

But it did not seem to make any difference, when debugging, my Uri still got escaped.

I am running this on a Mac with Mono, but I have not tried it on standard .Net on Windows to see if it has the same behavior.

Is there another way to get around this issue?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET