Skip to content

Conversation

brunnre8
Copy link
Contributor

The curl code generator modified the pointer arg, leading to issues when the generator was substituted for say go afterwards.

Rather than the expected http.NewRequest("HEAD", url, payload) it rendered it as http.NewRequest("--head", url, payload).

Instead, do the sanitization of the request in the applyVariables func and do the curl specific head transform on a copy.

The curl code generator modified the pointer arg, leading to issues
when the generator was substituted for say go afterwards.

Rather than the expected `http.NewRequest("HEAD", url, payload)`
it rendered it as `http.NewRequest("--head", url, payload)`.

Instead, do the sanitization of the request in the applyVariables func
and do the curl specific head transform on a copy.
Copy link
Collaborator

@mirzakhany mirzakhany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

@mirzakhany mirzakhany merged commit 7ccf891 into chapar-rest:main Mar 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants