plugins/action-copy-curl/README.md
A request action plugin for Yaak that converts HTTP requests into curl commands, making it easy to share, debug, and execute requests outside Yaak.
This plugin adds a 'Copy as Curl' action to HTTP requests, converting any request into its
equivalent curl command. This is useful for debugging, sharing requests with team members,
and executing requests in terminal environments where curl is available.
The plugin analyzes the given HTTP request and generates a properly formatted curl command that includes:
curl -X GET 'https://api.example.com/users' \
--header 'Accept: application/json'
curl -X POST 'https://api.example.com/users' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"name": "John Doe",
"email": "[email protected]"
}'
curl -X POST 'yaak.app' \
--header 'Content-Type: multipart/form-data' \
--form 'hello=world' \
--form file=@/path/to/file.json
curl -X GET 'https://api.example.com/protected' \
--user 'username:password'