Question

HTTPCaller Transformer using the Post method


Hi:

 

 

I have a HTTPCaller Transformer with Post method question.  This will take Input addresses and then compare them to an address standardizer web service.  

 

 

I’ve had success using GET method (with a concatened URL).  But in my scenario there is an advantage to the Post Method.  Does any have an example of using POST in the HttpCaller Transformer?

 

 

Below is a sample of what I’d hope todo –

 

POST /addresscorrection/service.asmx/Getstandardizedaddress HTTP/1.1

 

Host: test.testing.com

 

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

 

address=1125+Washington+St+SE+%23200&address2=&city=olympia&zip=98501&zip4=&state=wa

 

 

address: 1125 Washington St SE #200

 

address2:

 

city: Olympia

 

zip: 98501

 

zip4:

 

state: wa

 

 

 

Any help is appreciated:

 

Ian

3 replies

Userlevel 2
Badge +17
Hi,

 

 

I'm not so familiar with the HTTPCaller, but I have a success experience.

 

In my case, the posting values were HTML form inputs and did set the transformer parameters like this.

 

Upload Data: Multipart / Form Data

 

Multiple Upload:

 

Name  |  Type  |  Value

 

mail_address  |  StringUpload  |  xxxx@yyyy.com

 

indutry_code  |  StringUpload  |  1

 

etc.

 

 

By a case, you may have to access to the form page to get a Cookie by an HTTPCaller with GET method and then issue the POST request with another HTTPCaller.

 

In such a case, set "Yes" to the "HTTP Client Options / Save Cookie" parameter of the two HTTPCallers.

 

 

Hope this helps.

 

 

Takashi
Thanks Tashi for responding:

 

 

I’ve had a feeling I’ve been real close but myself and coworker spent quite of bit of time on this one.

 

I liked your form idea and using two httpcallers - as this service has a test form that use a post method. 

 

 

But the was solution much simpler in my case – I’m still a FME Newbie and had to remember I could enter a value

 

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

 

 

 

BTW can you use a tool like fiddler - to see if I could monitor my network request that is a bit more descriptive than in the FME log file?

 

 

Thanks Again:

 

Ian

 

 
Badge +16

Here is a workspace that uses POST and also standardizes addresses by way of geocoding against an Esri geocoder service (not public).batchgeocode.fmw

Reply