# Need help with a HTTPS request

**URL:** https://discourse.nodered.org/t/need-help-with-a-https-request/61912
**Category:** General
**Created:** [28 April 2022 07:33 UTC](https://discourse.nodered.org/t/need-help-with-a-https-request/61912 "2022-04-28T07:33:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [28 April 2022 07:33 UTC](https://discourse.nodered.org/t/need-help-with-a-https-request/61912/1 "2022-04-28T07:33:37Z")

</div>

Guys,

I have a https request to make and have spent a few hours trying various things but just not getting anywhere

Wondering if someone could give me a hand on this one ? (probably bloody do it in 5 minutes !!)

This works from the cli when i add in a valid API token

```auto
curl -s -w '\\n%{http_code}' -H 'Content-Type: application/json' -H 'Authorization: Bearer {apikey}' https://api2.hiveos.farm/api/v2/farms/{farmid}

```

Which looks like this (API key changed) when completed and works from a linux cli

```auto
curl -s -w '\\n%{http_code}' -H 'Content-Type: application/json' -H 'Authorization: Bearer fzJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9hcGkiLCJpYXQiOjE2NTExMzAzMzcsImV4cCI6MTk2NjQ5MDMzNywibmJmIjoxNjUxMTMwMzM3LCJqdGkiOjY1ODcwMTQ5LCJzdWIiOjY1ODcwMTQ5fQ.XWck4ovne0rvKGXAqZIjwTBsytYAIbjUD7G7sHbjias' https://api2.hiveos.farm/api/v2/farms/1401987

```

Anyone ?

Craig

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [28 April 2022 07:52 UTC](https://discourse.nodered.org/t/need-help-with-a-https-request/61912/2 "2022-04-28T07:52:57Z")

</div>

Aah - think i worked it out

Went to latest NR (my test environment was on NR 1.35) and it seems to work now using a function node to build the request and then pushing it into a Http request node

Craig

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [12 May 2022 07:53 UTC](https://discourse.nodered.org/t/need-help-with-a-https-request/61912/3 "2022-05-12T07:53:43Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
