Skip to content

Conversation

@hack3rvaillant
Copy link

@hack3rvaillant hack3rvaillant commented Mar 27, 2025

Switch from double quotes to single quotes in curl commands

Summary

This PR changes the quoting style in generated curl commands from double quotes to single quotes. This makes the generated commands more compatible with various shell environments and avoids common escaping issues when working with JSON payloads.

Changes

  • Changed all -d "..." parameters to use single quotes: -d '...'
  • Changed all -H "..." header parameters to use single quotes: -H '...'
  • Updated the escaping pattern in jsonContentToString() to handle single quotes instead of double quotes
  • Updated all test snapshots to reflect the new quoting style

Benefits

  • Improved compatibility with different shell environments
  • Easier to copy-paste commands that contain JSON with double quotes
  • More consistent with common curl usage patterns in documentation and examples

Testing

All existing tests pass with the updated snapshots.

@hack3rvaillant hack3rvaillant changed the title Fix quotes Switch from double quotes to single quotes in curl commands Mar 27, 2025
@hack3rvaillant hack3rvaillant marked this pull request as ready for review March 27, 2025 10:14
@albertodeago
Copy link
Owner

Thanks for the contribution! will merge and deploy

@albertodeago albertodeago merged commit 6abaac9 into albertodeago:master Mar 28, 2025
1 check passed
@albertodeago
Copy link
Owner

Released with v0.4.2 <3

@hack3rvaillant
Copy link
Author

Thanks for the contribution! will merge and deploy

Thank you for maintaining this very useful library 🙏

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