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: 5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2    Statistic  

CURL.GetResultAsContainer

Returns the result of the transaction as container value with auto detection of type.

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

MBS( "CURL.GetResultAsContainer"; Handle { ; Filename; PluginDetect } )

Parameters

Parameter Description Example value
Handle The CURL session handle. $curl
Filename Optional
The desired file name
test.jpg
PluginDetect Optional
If 1 the plugin will do the file type detection. If not provided or 0 and the FileMaker version is 13.0 or newer, the FileMaker engine will decide on the type.

Result

Returns OK or error.

Description

Returns the result of the transaction as container value with auto detection of type.
The plugin will detect the type of data based on the file extension.
If no filename is provided, the plugin uses the filename from the URL.

Examples

Load JPEG from URL to container:

# start new transfer
Set Variable [$curl; Value:MBS("CURL.New")]
# set URL
Set Variable [$r; Value:MBS("CURL.SetOptionURL"; $curl; "http://monkeybreadsoftware.de/filemaker/images/devcon2013.jpg")]
# run transfer
Set Variable [$ErrorCode; Value:MBS("CURL.Perform"; $curl)]
# get result as JPG and store in field:
Set Variable [$Result; Value:MBS( "CURL.GetResultAsContainer"; $curl)]
Set Field [test::MyContainerField; $Result]
# get debug messages:
Set Variable [$DebugMessages; Value:MBS( "CURL.GetDebugAsText"; $curl)]
# cleanup
Set Variable [$r; Value:MBS("CURL.Cleanup"; $curl)]

See also


CURL.GetResponseCode   -   CURL.GetResultAsData

Feedback: Report problem or ask question.




Links
MBS Realbasic Plugins - Förderverein St. Arnulf Nickenich