Skip to main content

TURL_GetLastHTTPStatusCode (function reference)

By October 1, 2021October 13th, 2021Online Help, Troi URL plug-in
Troi URL Plug-in > Functions reference > TURL_GetLastHTTPStatusCode
Troi URL Plug-in for FileMaker Pro

TURL_GetLastHTTPStatusCode

Returns the HTTP response status code from the last executed HTTP request.

SyntaxFunction badge

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:

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 functionsFunction badge

TURL_Delete
TURL_Get
TURL_Post
TURL_Put

Related topics

Troi URL Plug-in online help (overview)


Online Help Page for Troi URL Plug-in for 16 to 19 –> TURL_GetLastHTTPStatusCode (urlp4421) 2021-1013 16:27:51