2

So I've got a site in .NET 2.0 (VB.NET)

I need to send a request to a third party service with a WebRequest. Unfortunately, the request needs to send URL encoded data in the query string and it appears that the HTTP request object automatically decodes URLs.

I ran across this post Creating an Uri in .NET automatically urldecodes all parameters from passed string and this post Help with C# HttpWebRequest URI losing its encoding which point me to this documentation https://msdn.microsoft.com/en-us/library/system.uri(v=VS.100).aspx which basically tells me I'm screwed and I"m going to have to hack like crazy to get this to work.

There seems like there has to be an easier way to stop the WebRequest from automatically decoding the URLs. Does anyone have any ideas?

Community
  • 1
  • 1
Chuck Finley
  • 295
  • 1
  • 4
  • 12

0 Answers0