CURL.AddOptionHTTPHeader
------------------------

Adds to the http header list.

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

MBS( "CURL.AddOptionHTTPHeader"; curl; Values... ) 

**MBS**( **"CURL.AddOptionHTTPHeader";** /\* Adds to the http header list. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Values...**) /\* Header valuese.g. "Content-Type: text/xml" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Values... | Header values | "Content-Type: text/xml" |

### Result

Returns OK or error.

### Description

Adds to the http header list.  
While [CURL.SetOptionHTTPHeader](CURLSetOptionHTTPHeader.md) sets them all, you can call CURL.AddOptionHTTPHeader as often as needed to add more HTTP headers.  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat Values parameter as often as you need.  
### Examples

Set a few HTTP headers:

 Let(\[  
 curl = MBS ("[CURL.New](CURLNew.md)");  
 r = MBS ( "CURL.AddOptionHTTPHeader"; curl; "Authorization: Bearer a92eabb9-76f9-42ee-b280-bcd15cb2e9db" );  
 r = MBS ( "CURL.AddOptionHTTPHeader"; curl; "Content-Type: application/json" );  
 r = MBS ( "CURL.AddOptionHTTPHeader"; curl; "Expect:"; "Cache-Control: no-cache" );  
 options = MBS ("[CURL.Options](CURLOptions.md)"; curl)  
\]; options)  
<small>  
Example result:   
{ "HTTPHeader" : \[ "Authorization: Bearer a92eabb9-76f9-42ee-b280-bcd15cb2e9db" , "Content-Type: application/json" , "Expect:" , "Cache-Control: no-cache" \], "Verbose" : 1 , "NoProgress" : 0 , "FollowLocation" : 1 , "MaxRedirs" : 3 , "NoSignal" : 1 , "DisallowUserNameInURL" : 1 , "UploadBufferSize" : 32768 } </small>Set HTTP Header in script:

 Set Variable \[ $curl ; Value: MBS ("[CURL.New](CURLNew.md)") \]  
Set Variable \[ $result ; Value: MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; $curl ; CURL Test::URL ) \]  
Set Variable \[ $result ; Value: MBS ( "CURL.AddOptionHTTPHeader"; $curl ; "Content-Type: application/json" ) \]  
Set Variable \[ $result ; Value: MBS ( "CURL.AddOptionHTTPHeader"; $curl ; "Expect:"; "Cache-Control: no-cache" ) \]  
Set Field \[ CURL Test::Result ; MBS ("[CURL.Perform](CURLPerform.md)"; $curl ) \]  
Set Field \[ CURL Test::Text ; MBS ("[CURL.GetResultAsText](CURLGetResultAsText.md)"; $curl ; CURL Test::TextEncoding ) \]  
Set Field \[ CURL Test::Debug Messages ; MBS ("[CURL.GetDebugMessages](CURLGetDebugMessages.md)"; $curl ) \]  
Set Variable \[ $result ; Value: MBS ("[CURL.Release](CURLRelease.md)"; $curl ) \]  
### See also

- [CURL.GetDebugMessages](CURLGetDebugMessages.md)
- [CURL.GetOptionHTTPHeader](CURLGetOptionHTTPHeader.md)
- [CURL.GetResultAsText](CURLGetResultAsText.md)
- [CURL.New](CURLNew.md)
- [CURL.Options](CURLOptions.md)
- [CURL.Perform](CURLPerform.md)
- [CURL.Release](CURLRelease.md)
- [CURL.SetOptionHTTPHeader](CURLSetOptionHTTPHeader.md)
- [CURL.SetOptionURL](CURLSetOptionURL.md)

### Release notes

- **Version 16.2**
    - Added [CURL.AddOptionHTTPHeader](https://www.mbsplugins.eu/CURLAddOptionHTTPHeader.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin 16.2 News](https://www.mbsplugins.de/archive/2026-05-20/MBS_FileMaker_Plugin_162_News/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 16.2 für Claris FileMaker](https://www.mbsplugins.de/archive/2026-05-05/Neues_MBS_Plugin_162_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 16.2 for Claris FileMaker](https://www.mbsplugins.de/archive/2026-05-05/MBS_Plugin_162_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 16.2pr5](https://www.mbsplugins.de/archive/2026-05-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [ISO FileMaker Magazine: Stop Waiting: Use MBS cURL Async within FileMaker](https://www.mbsplugins.de/archive/2026-04-29/ISO_FileMaker_Magazine_Stop_Wa/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 28th April 2026 , last changed 28th April 2026

  
[CURL.AddInputText](CURLAddInputText.md) - [CURL.AvailableSSLBackends](CURLAvailableSSLBackends.md)

[HTML Version](CURLAddOptionHTTPHeader.shtml)