title: Error on TIdHTTP on Setting Host and Port at Runtime for SMS web service delivery
body: <p>I am trying to use an SMS API for Delphi from <a href="http://www.human.com.br" rel="nofollow">http://www.human.com.br</a> but I get an 'access violation' error when the component tries to set the host and port of the webservice after creating an instance of Indy's <code>TIdHTTP</code>.</p>
  
  <pre><code>host := TidHTTP.Create; 
  host.Socket.Port := 80; // error right here!
  host.Socket.Host := 'system.human.com.br';
  uri := TidURI.Create();
  </code></pre>
  
  <p>The original component was created in Indy60 and I have Indy170, so the was no <code>Socket</code> between <code>host</code> and <code>Port</code> and I had to put it.</p>
  
  <p>What is wrong? I tried to put the component directly on the form and in the button code I did the Socket settings and I get the same error too!</p>
  
  <hr>
  
  <p>The send method they use is this:</p>
  
  <pre><code> data := TIdMultiPartFormDataStream.Create;
   host.Request.ContentType := 'application/x-www-form-urlencoded';
   host.Post(strSMStext , data);
  </code></pre>