Kong / Kong/apiembed

Headers in Node Http not working

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Pug
Stars
413
Forks
52
PR merge metrics
No merged PRs in 30d

Description

Config Example:
```javascript
{
"method": "POST",
"url": "https://api.z-api.io/instances/SUA_INSTANCIA/token/SEU_TOKEN/send-text",
"httpVersion": "HTTP/1.1",
"queryString": [],
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
etc.....
```

Result:
```javascript
var http = require("https");

var options = {
"method": "POST",
"hostname": "example.com",
"port": null,
"path": "/save",
"headers": {} // headers empty
};

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue using the JavaScript configuration example and compare the generated Node HTTP request, focusing on why the configured headers become empty. Done means the generated request includes the configured Content-Type header and preserves the expected POST request behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.