CURL.SetOptionPut
-----------------

Sets transfer to be a HTTP Put.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md). Use [CURL.SetOptionUpload](CURLSetOptionUpload.md) instead.

MBS( "CURL.SetOptionPut"; curl; Value ) 

**MBS**( **"CURL.SetOptionPut";** /\* Sets transfer to be a HTTP Put. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* Whether this is a PUT request.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | Whether this is a PUT request. | 1 |

### Result

Returns "OK" on success.

### Description

Sets transfer to be a HTTP Put.  
A parameter set to 1 tells the library to use HTTP PUT to transfer data. The data should be set with [CURL.SetInputText](CURLSetInputText.md) or other functions.  
This option is deprecated and starting with version 7.12.1 you should instead use [CURL.SetOptionUpload](CURLSetOptionUpload.md).  
### Examples

Turns put on:

 MBS ( "CURL.SetOptionPut"; $curl ; 1 )  
Make request with PUT:

 Set Variable \[$curl ; Value:MBS ("[CURL.New](CURLNew.md)")\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; $curl ; "http://test.test/test/hello.txt")\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionUpload](CURLSetOptionUpload.md)"; $curl ; 1)\]  
Set Variable \[$result ; Value:MBS ("CURL.SetOptionPut"; $curl ; 1)\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionPassword](CURLSetOptionPassword.md)"; $curl ; CURL Test::Password )\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionUserName](CURLSetOptionUserName.md)"; $curl ; CURL Test::Name )\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetInputText](CURLSetInputText.md)"; $curl ; "This is content to upload")\]  
\# run   
Set Field \[CURL Test::Result ; MBS ("[CURL.Perform](CURLPerform.md)"; $curl )\]  
\# check results   
Set Field \[CURL Test::debug ; MBS ("[CURL.GetDebugMessages](CURLGetDebugMessages.md)"; $curl )\]  
Set Variable \[$result ; Value:MBS ("[CURL.Release](CURLRelease.md)"; $curl )\]  
### See also

- [CURL.SetInputText](CURLSetInputText.md)
- [CURL.SetOptionPort](CURLSetOptionPort.md)
- [CURL.SetOptionPost](CURLSetOptionPost.md)
- [CURL.SetOptionPreQuote](CURLSetOptionPreQuote.md)
- [CURL.SetOptionProxy](CURLSetOptionProxy.md)
- [CURL.SetOptionRange](CURLSetOptionRange.md)
- [CURL.SetOptionTimeOut](CURLSetOptionTimeOut.md)
- [CURL.SetOptionUpload](CURLSetOptionUpload.md)
- [CURL.SetOptionURL](CURLSetOptionURL.md)
- [CURL.SetOptionUserName](CURLSetOptionUserName.md)

### Example Databases

- [CURL/CURL get and put/CURLS get and put](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/CURL%20get%20and%20put/CURLS%20get%20and%20put.shtml#1ScriptAnchor_)
- [CURL/WebServices/CURL FMS Admin API v17](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/WebServices/CURL%20FMS%20Admin%20API%20v17.shtml#28ScriptAnchor_)
- [CURL/WebServices/CURL FMS Admin API v18](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/WebServices/CURL%20FMS%20Admin%20API%20v18.shtml#28ScriptAnchor_)

### Blog Entries

- [Comparing Base Elements Plugin to MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2017-10-24/Comparing_Base_Elements_Plugin/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 12nd June 2020

  
[CURL.SetOptionProxyUsername](CURLSetOptionProxyUsername.md) - [CURL.SetOptionQuickExit](CURLSetOptionQuickExit.md)

[HTML Version](CURLSetOptionPut.shtml)