cURL / Mailing Lists / curl-users / Single Mail

curl-users

Web service server doesn't see posted data

From: Bruce, Henry <henry.bruce_at_intel.com>
Date: Tue, 8 Apr 2008 15:25:56 -0700

I've been doing some REST web service work with curl and have
successfully communicated with the yahoo local search service with curl
commands as follows

--url http://local.yahooapis.com/LocalSearchService/V3/localSearch
--data appid=YahooDemo
--data query=pizza
--data zip=94306
--data results=2

This works as expected, returning XML data.

However, when I tried the same approach with the NOAA weather service
with the commands listed below, the call failed, with the server
reporting it didn't see any parameters
--url
http://www.weather.gov/forecasts/xml/sample_products/browser_interface/n
dfdXMLclient.php
--data lat=45.550980
--data lon=-122.917359
--data product=time-series
--data begin=2008-04-08T15:00:00
--data end=2008-04-08T16:00:00
--data pop12=pop12

However, if I put the entire URI into the URL, it works just fine
--url
http://www.weather.gov/forecasts/xml/sample_products/browser_interface/n
dfdXMLclient.php?&lat=45.550980&lon=-122.917359&product=time-series&begi
n=2008-04-08T13:00:00&end=2008-04-08T14:00:00&pop12=pop12

I have seen a similar failure with our local (Portland, Oregon) traffic
web service.

Is there something that I'm not doing correctly, or is there a problem
with the web service servers ?

Thanks,

Henry
Received on 2008-04-09