title: How to consume webservice using CURL command?
body: <p>I am trying to consume webservices using unix <code>CURL</code> command but somehow I am getting request denied error.</p>
  
  <p>I am trying to consume this webservice url-</p>
  
  <p><a href="http://maps.googleapis.com/maps/api/distancematrix/json?origins=95112&amp;destinations=94000&amp;mode=bicycling&amp;sensor=false" rel="nofollow">http://maps.googleapis.com/maps/api/distancematrix/json?origins=95112&amp;destinations=94000&amp;mode=bicycling&amp;sensor=false</a></p>
  
  <p>I am able to open the above url in the browser and I am able to see the contents.</p>
  
  <p>Now I am trying to consume the same webservice using CURL command but it's not working for me.</p>
  
  <p>I am trying something like this-</p>
  
  <p><code>curl http://maps.googleapis.com/maps/api/distancematrix/json?origins=95050&amp;destinations=94087&amp;mode=bicycling&amp;sensor=false</code></p>
  
  <p>Is there anything wrong I am doing? I need to extract <code>text portion of distance object</code>.</p>
  
  <p>Can anyone help me with this?</p>