title: C# httpclient get response
body: <p>I used httpClient to send data to the server. I can check the response successfully, but my response string is in a php file. I don't know how to access this string in php with something like: </p>
  
  <pre><code>if user exist echo true; 
  else echo false;
  </code></pre>
  
  <p>I tried with WebClient class. It worked but I was unable to check if it's response is successful.</p>
  
  <p>Here is the code: </p>
  
  <pre><code>public Boolean authorization(String korisnik, String zaporka)
  {
       var client = new HttpClient();
  
       var pairs = new List&lt;KeyValuePair&lt;string, string&gt;&gt;
       {
           new KeyValuePair&lt;string, string&gt;("korisnik", korisnik),
           new KeyValuePair&lt;string, string&gt;("zaporka", zaporka)
       };
  
       var content = new FormUrlEncodedContent(pairs);
  
       var response = client.PostAsync("http://www.etfos.unios.hr/~tsapina/autorizacija.php", content).Result;
       System.Diagnostics.Debug.WriteLine(response);
       if (response.IsSuccessStatusCode)
       {
            MessageBox.Show("success respond");
            return false;
        }
       return true;
  }
  </code></pre>
  
  <p>I need to get result in a php file output.</p>