HttpWebRequest

R

Rob

Hello to all,
I'm trying to send an http command. The supplier of the service I have to
use said me that I have not to send the URI string encoded, it means,
special characters have not to be sent encoded, for example, " has NOT TO be
send as %22, space has NOT TO be send as %20, Û has NOT TO BE send as
%C3%9B.
How can I do that?. For the request I use the following:

Dim req As Net.HttpWebRequest =
CType(Net.WebRequest.Create(requestUriString), Net.HttpWebRequest)

Dim response As Net.HttpWebResponse =
CType(req.GetResponse(), Net.HttpWebResponse)

and I can see that req.Address.AbsoluteUri is always encoded.

Thanks for help!
 
B

bruce barker

instead of passing a string to the webrequest, pass a Uri: new
Uri(url,"",true), to create the uri with escape turned off.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top