postmanlabs / postmanlabs/postman-code-generators
Go-Template and Casing in name of header
Open
Nobody has claimed this yet.
codegen
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 381
- PR merge metrics
- No merged PRs in 30d
Description
The go template change the casing of header names.
req.Header.Add("SOAPAction", "MyHeader")
will result in: Soapaction: MyHeader
The template should use this instead to preserve the casing:
req.Header["SOAPAction"] = []string{"MyHeader"}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect codegens/golang/lib/index.js around line 163, where the Go request template handles headers. Compare the generated output for SOAPAction with the reported examples and verify that the completed template preserves header-name casing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100