# HTTP request POST wirh multiple headers

**URL:** <https://community.homey.app/t/http-request-post-wirh-multiple-headers/66906>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [August 4, 2022, 12:20pm UTC](https://community.homey.app/t/http-request-post-wirh-multiple-headers/66906 "2022-08-04T12:20:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![janrikard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/janrikard/32/34785_2.png) [@janrikard](https://community.homey.app/u/janrikard)\
**Post date:** [August 4, 2022, 12:20pm UTC](https://community.homey.app/t/http-request-post-wirh-multiple-headers/66906/1 "2022-08-04T12:20:50Z")

</div>

Hi

How do i post more than one header in a http request card?  
I nead both Content-Type: application/json and a bearer:“Password”

/Rikard

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [August 4, 2022, 12:34pm UTC](https://community.homey.app/t/http-request-post-wirh-multiple-headers/66906/2 "2022-08-04T12:34:04Z")

</div>

> [@janrikard](#):
>
> bearer

I would suggest to use JSON:  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/0/a00f3845df15c6cd18c0ec3210e36edfe10637d0.png)  
But I haven’t tested yet.

---

<div class="post-metadata">

**Author:** ![janrikard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/janrikard/32/34785_2.png) [@janrikard](https://community.homey.app/u/janrikard)\
**Post date:** [August 4, 2022, 2:21pm UTC](https://community.homey.app/t/http-request-post-wirh-multiple-headers/66906/3 "2022-08-04T14:21:48Z")

</div>

with just a comma(,) it seems to work.

But then it complaints about the body missing. The body is just in the format of

{ viewer { homes { currentSubscription{ priceInfo{ today { total energy tax startsAt } tomorrow { total energy tax startsAt }}}}}}

But it maybe needs to be in an array-form?  
this is the complete working setup in php

$json = json\_encode(array(‘query’ =\> ‘{ viewer { homes { currentSubscription{ priceInfo{ today { total energy tax startsAt } tomorrow { total energy tax startsAt }}}}}}’));

$ch = curl\_init();  
curl\_setopt($ch, CURLOPT\_URL, ‘[https://api.tibber.com/v1-beta/gql](https://api.tibber.com/v1-beta/gql)’);  
curl\_setopt($ch, CURLOPT\_HTTPHEADER,  
array(‘Content-Type: application/json’,  
'Authorization: Bearer XXXXXXXXXXX));  
curl\_setopt($ch, CURLOPT\_POST, true);  
curl\_setopt($ch, CURLOPT\_POSTFIELDS, $json);  
curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, true);
