Navigation:  Advanced Topics > Web Services >

Http / POST

I think most people know what the difference between GET and POST is, but if anyone wants a nice definition, try this

 

http://www.cs.tut.fi/~jkorpela/forms/methods.html

 

 

Go the the Web Service example page and scroll down the the POST example. It sets out nicely what it expects

 

http://ws.cdyne.com/WeatherWS/Weather.asmx?op=GetCityForecastByZIP

 

 

POST /WeatherWS/Weather.asmx/GetCityForecastByZIP HTTP/1.1

Host: ws.cdyne.com

Content-Type: application/x-www-form-urlencoded

Content-Length: length

 

ZIP=string

 

From this, we can deduce that the correct URL is

 

http://ws.cdyne.com/WeatherWS/Weather.asmx?op=GetCityForecastByZIP
we need to have "ZIP=<MyZIPCode>" as our Request content.

 

HTTPPost

 

SO, we have set the following parameters

 

URL to http://ws.cdyne.com/WeatherWS/Weather.asmx?op=GetCityForecastByZIP
Request Method to POST
Request Content to "ZIP=94028"
We also set the Output file URL, as with our GET example. If you want to see how to use input/output ports, please look at the SOAP example in the next section. The SOAP example contains an example of us parsing this return XML in Clover using the XMLXPathReader component and ports.

 

If you like, check out the video (last topic in this chapter) at the end of this Chapter.