Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides
New in version: 6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  


Get the last received HTTP or FTP code.

Component: CURL
Version: 2.5
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "CURL.GetResponseCode"; Handle )


Parameter Description Example value
Handle The CURL session handle. $curl


Returns the requested value or nothing on error.


Get the last received HTTP or FTP code.
This will be zero if no server response code has been received. Note that a proxy's CONNECT response should be read with CURL.GetHTTPConnectCode and not this.
For HTTP this is the normal status code. e.g. 200 for OK and 404 for file not found.


On success puts download in container, else shows failed:

Set Variable [$errorCode; Value:MBS("CURL.ErrorCode"; $curl)]
Set Variable [$httpResult; Value:MBS("CURL.GetResponseCode"; $curl)]
Set Field [Download Async::Result; $errorCode]
Set Field [Download Async::DebugMessages; MBS("CURL.GetDebugAsText"; $curl)]
If [$errorCode = 0 and $httpResult = 200]
    Set Field [Download Async::Progress; "Done"]
    Set Field [Download Async::Output; MBS("CURL.GetResultAsContainer"; $curl)]
    Set Field [Download Async::Progress; "Failed"]
    Set Field [Download Async::Output; ""]
End If

See also

CURL.GetRequestSize   -   CURL.GetResultAsContainer

Feedback: Report problem or ask question.

MBS FileMaker Plugins - Pfarrgemeinde Ministranten Nickenich