| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
CURL.GetResponseCode
Get the last received HTTP or FTP code.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "CURL.GetResponseCode"; curl ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
Result
Returns the requested value or nothing on error.
Description
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.
Examples
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.GetDebugMessages"; $curl)]
If [$errorCode = 0 and $httpResult = 200]
Set Field [Download Async::Progress; "Done"]
Set Field [Download Async::Output; MBS("CURL.GetResultAsContainer"; $curl)]
Else
Set Field [Download Async::Progress; "Failed"]
Set Field [Download Async::Output; ""]
End If
Set Variable [$httpResult; Value:MBS("CURL.GetResponseCode"; $curl)]
Set Field [Download Async::Result; $errorCode]
Set Field [Download Async::DebugMessages; MBS("CURL.GetDebugMessages"; $curl)]
If [$errorCode = 0 and $httpResult = 200]
Set Field [Download Async::Progress; "Done"]
Set Field [Download Async::Output; MBS("CURL.GetResultAsContainer"; $curl)]
Else
Set Field [Download Async::Progress; "Failed"]
Set Field [Download Async::Output; ""]
End If
See also
- CURL.GetDebugMessages
- CURL.GetFileTime
- CURL.GetHTTPConnectCode
- CURL.GetResultAsContainer
- CURL.Perform
- CURL.SetOptionFileTime
- CURL.SetOptionSSLCert
- CURL.SetupOAuth
- JSON.GetPathItem
- JSON.Parse
Example Databases
- CURL/Amazon S3/Amazon S3 Buckets
- CURL/Amazon S3/Containers in S3
- CURL/CURL Download Picture
- CURL/Email/Office 365 oAuth SMTP
- CURL/WebServices/AdobeSign WebService
- CURL/WebServices/CURL FMS Admin API v17
- CURL/WebServices/CURL FMS Admin API v18
- CURL/WebServices/magento older
- CURL/WebServices/Query IP and Country
- CURL/WebServices/Sales Force Test
Blog Entries
- Using Gmail with oAuth2 for SMTP with MBS Plugin
- Send Audit Log via CURL in background
- How long do you wait for Insert From URL to finish?
- SMTP with OAuth for Office 365 in FileMaker
- Translating Insert from URL options for CURL to MBS Plugin calls
- Using Apple's Global Service Exchange web service in FileMaker
- Comparing Base Elements Plugin to MBS FileMaker Plugin
- Using Apple's Global Service Exchange web service in FileMaker
- Query geolocation in FileMaker via MBS Plugin and Google Maps API
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 12nd July 2015