# How to include HTTP headers by mapping?

**URL:** <https://community.make.com/t/how-to-include-http-headers-by-mapping/26246>\
**Category:** Questions\
**Tags:** error, http\
**Created:** [February 2, 2024, 12:56pm UTC](https://community.make.com/t/how-to-include-http-headers-by-mapping/26246 "2024-02-02T12:56:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eliassilva](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@eliassilva](https://community.make.com/u/eliassilva)\
**Post date:** [February 2, 2024, 12:56pm UTC](https://community.make.com/t/how-to-include-http-headers-by-mapping/26246/1 "2024-02-02T12:56:19Z")

</div>

Hello Automators!

I have a HTTP module in which I want to include a list of headers. Instead of adding them one by one, I would like to toggle the MAP switch and add them manually, however I couldn’t find a way to do it. No matter which format I pass to the module, it always returns me:  
“ **HTTP Array of objects expected in parameter ‘headers’.** ”

I already tried the following structures:

```auto
[
            {
                "name": "content-type",
                "value": "application/json"
            },
            {
                "name": "example-name-2",
                "value": "example-value-2"
            }
]

```

```auto
[
            { "content-type" :"application/json" },
            { "example-name-2" : "example-value-2" }
]

```

```auto
[
            { 
                        "content-type" :"application/json",
                        "example-name-2" : "example-value-2"
            }
]

```

Does any of you know how can I include custom headers by mapping them into the module?

Thanks in advance! 🙂

---

<div class="post-metadata">

**Author:** ![Levin](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@Levin](https://community.make.com/u/Levin)\
**Post date:** [February 2, 2024, 1:54pm UTC](https://community.make.com/t/how-to-include-http-headers-by-mapping/26246/3 "2024-02-02T13:54:06Z")

</div>

That’s a [make.com](http://make.com) problem.  
An array is expected in the form of [make.com](http://make.com)  
You must first assemble your header input into an array and then take this array as input to the module

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [February 2, 2024, 4:06pm UTC](https://community.make.com/t/how-to-include-http-headers-by-mapping/26246/4 "2024-02-02T16:06:21Z")

</div>

Welcome to the Make community!

Your first structure is correct.

**However!**

That is just a JSON **string** representation of an array, but it is not a variable of type array.

You need to convert the JSON **string** into an **array** using the Parse JSON module.

 ![Screenshot_2024-02-03_000237](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/9/09d5044548058b152a1a04676fc92cabfae68f6f.png)

![Screenshot_2024-02-03_000227](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/0/20d74f0178504667f3d6f3e33fda5c5fb5290753.png)

Output:

 ![Screenshot_2024-02-03_000220](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/a/0aad7122ed587aa52d4924cb8897c48b28fc1ace.png)

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [February 16, 2024, 4:31pm UTC](https://community.make.com/t/how-to-include-http-headers-by-mapping/26246/5 "2024-02-16T16:31:54Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


