FileMaker Pro 13 – HTTP POST and HTTP Headers | Databuzz

written by  – Leave a reply

In FileMaker Pro v13 you can now perform an HTTP POST when importing XML data or using the “Insert from URL” script step. Both HTTP GET and HTTP/S POST are supported – GET and POST are generally the 2 most popular HTTP Request Methods when working with web services.

FileMaker Pro v12 already supported HTTP GET so nothing has changed here – you only need to specify the URL to perform an HTTP GET request. To perform an HTTP POST request you need to specify a URL starting with either:

  • httppost
  • httpspost

You then include a “?” character in the URL to separate the request URL from the POST data. Everything before the first “?” character is the request URL and everything after the first “?” character is the post data. For example to query a web service that converts Fahrenheit to Celsius you would use the following URL:

httppost://www.w3schools.com/webservices/tempconvert.asmx/FahrenheitToCelsius?Fahrenheit=100

FileMaker Pro recognises that you wish to perform an HTTP POST by the use of “httpost” at the beginning of the URL. The URL for the HTTP POST then becomes everything up to the first “?” character:

http://www.w3schools.com/webservices/tempconvert.asmx/FahrenheitToCelsius

and the POST data is everything after the first “?” character:

Fahrenheit=100

We get an XML result like this:

<?xml version=”1.0″ encoding=”utf-8″?><string xmlns=”http://www.w3schools.com/webservices/”>37.7777777777778</string>

which we could easily parse using FileMaker functions to get the actual Celsius value into a FileMaker field (see Demo File link at the bottom).

FileMaker Pro 13 – HTTP POST and HTTP Headers | Databuzz.

Thanks! You've already liked this
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help