httpResponseCode ( responseHeaders )
Retrieves the last HTTP Response Code from the Response Headers
Average rating: 4.0 (3 votes) Log in to vote
Andrew Duncan - Show more from this author
Databuzz https://www.databuzz.com.au |
Date: Wed, 13 Jun 2018 04:45:17 GMT
Server: Apache/2.4.26 (Red Hat)
X-Powered-By: PHP/5.6.35
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8" )
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
When working with APIs you often need to check the HTTP Response Code to confirm the request was successful. By passing in the Response Headers from your HTTP request this function will return the last response code found in the Response Headers. For example when using the native cURL options in FileMaker Pro v16 and later:
" --dump-header $responseHeaders"
If more than one response code is returned it will return the last response code from the Response Headers.
N.B. this function requires the Trim4 custom function
Comments
Daniel Feb 5, 2021 |
||
Thanks this was a quick fix when I started encountering multiple HTTP response codes. | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.