Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Sets transfer to be a HTTP Put.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
This function was deprecated. Use CURL.SetOptionUpload instead.
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Value | Whether this is a PUT request. | 1 |
Returns "OK" on success.
Turns put on:
MBS( "CURL.SetOptionPut"; $curl; 1 )
Make request with PUT:
Set Variable [$curl; Value:MBS("CURL.New")]
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "http://test.test/test/hello.txt")]
Set Variable [$result; Value:MBS("CURL.SetOptionUpload"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionPut"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionPassword"; $curl; CURL Test::Password)]
Set Variable [$result; Value:MBS("CURL.SetOptionUserName"; $curl; CURL Test::Name)]
Set Variable [$result; Value:MBS("CURL.SetInputText"; $curl; "This is content to upload")]
# run
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
# check results
Set Field [CURL Test::debug; MBS("CURL.GetDebugMessages"; $curl)]
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Created 18th August 2014, last changed 12nd June 2020