TURL_GetLastHTTPStatusCode |
Returns the HTTP response status code from the last executed HTTP request.
Syntax
TURL_GetLastHTTPStatusCode
Parameters
none |
Returned Result
Data type returned
Number
Result
returns the HTTP status code from the last GET, POST, PUT or DELETE function you performed.
If there is no status code the result is 0.
Originated in
Troi URL Plug-in 4.5
Compatibility
FileMaker Pro 16 to 19
Considerations
See this web page for possible HTTP status codes:
Example
Set Variable [ result ; GetLastHTTPStatusCode ]
This will for example return 200. This means the last request was handled OK.
Example 2
Set Field [ thePage ; TURL_Get ( "-unused" ; "http://www.example.com" ) ]
Set Field [ gStatusCode ; TURL_GetLastHTTPStatusCode ]
This will get the web page into the field thePage and put the HTTP status code, for example 404, into the global field gStatusCode.
Related functions
TURL_Delete |
TURL_Get |
TURL_Post |
TURL_Put |
Related topics
Troi URL Plug-in online help (overview)