Hi,
I have a problem with a webrequest with the below code.
If I try to request "http://www.google.com", it works fine.
But when I try to reach this long URL below with this code, I receive an error:
I wonder what this depends on and what could be done?
The remote server returned an error: (400) Bad Request."
//HttpWebRequest^ myRequest = (HttpWebRequest^)WebRequest::Create("http://www.google.com");
HttpWebRequest^ myRequest = (HttpWebRequest^)WebRequest::Create("http://www.xxxxxxxxxxxxxxx.com/en/trading/exchanges.php?exch=arcaedge&showcategories=STK&showproducts=All&sequence_idx=100&sortproducts=&ib_entity=uk#show");
myRequest->Method = "GET";
myRequest->Timeout = 10000;
WebResponse^ myResponse = myRequest->GetResponse();
StreamReader^ sr = gcnew StreamReader(myResponse->GetResponseStream(), System::Text::Encoding::UTF8);
String^ result = sr->ReadToEnd();
result = result->ToLower(); //make to lower
sr->Close();
MessageBox::Show(result);