Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Testing IONOS cloud, parsing headers, cURL, node
# This approach works. ✅
# The idea is possibly cURL is tolerant to invalid headers.
# How to test:
# 1. Install cURL
# 2. In your terminal copy and paste:
curl -v -H 'X-TOKEN: 1234' ''
This does not work because nodejs cannot parse the headers. 🐛
How to reproduce:
1. Install nodejs
2a. Try to you use your company's module with node:
2b. `npm install superagent` and run this script with node
const superagent = require("superagent");
const endpointUrl = "";
const token = "1234";
.set("X-TOKEN", token)
.then(res => console.log("res", res))
.catch(err => console.error("err", err)); // ⬅️⚠️ it will not parse headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.