title: GetResponse() error due to 'WebRequest'
body: <p>I am trying to make a request to Googles API.  But I am getting an error with <code>GetResponse()</code>.  The error I am getting is...</p>
  
  <p><code>'WebRequest' does not contain a definition for 'GetResponse'...</code></p>
  
  <p>Visual Studio gives me the option to replace that with <code>BeginGetResponse()</code>, but I am not sure how to format the code or change what I already have to accomplish this.  Can anyone point me in the right to direction to resolve this?  It is possible I am missing some assemblies... but I don't think I am.</p>
  
  <pre><code>private void SearchButton_Click(object sender, RoutedEventArgs e)
      {    
        var address = addressInput.Text;
        var requestUri = string.Format("https://maps.googleapis.com/maps/api/geocode/json?address={0}&amp;sensor=false", Uri.EscapeDataString(address));
  
        MessageBox.Show(requestUri.ToString());
  
  
        var request = WebRequest.Create(requestUri);
        var response = request.GetResponse();
        var xdoc = XDocument.Load(response.GetResponseStream());    
  
        var result = xdoc.Element("GeocodeResponse").Element("result");
        var locationElement = result.Element("geometry").Element("location");
        var lat = locationElement.Element("lat");
        var lng = locationElement.Element("lng");
  }
  </code></pre>