postmanlabs / postmanlabs/postman-code-generators

Why using headers when it is not required in C-libcurl?

Open
#732 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1k
Forks
381
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
in code snippet generated for C-libcurl for simple get request it is using headers as NULL while we don't need it as we haven't created any custom headers

To Reproduce
paste the API and produce the code-snippet for C-libcurl keep the method as get

Expected code snippet and corresponding request
I don't think it is required it is unnecessarily bloating the code

Screenshots
Screenshot 2024-03-21 at 5 11 18 PM

Additional context
I have experienced this on website of postman

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the C-libcurl code generator and reproduce the simple GET request described in the issue. Compare the generated snippet with and without custom headers. Done means the simple request no longer includes the unnecessary headers argument while requests with custom headers still generate correctly.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.