Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yhkaplan/curlgen
μframework for debugging with URLRequests, converting them to cURL commands
https://github.com/yhkaplan/curlgen
Last synced: about 1 month ago
JSON representation
μframework for debugging with URLRequests, converting them to cURL commands
- Host: GitHub
- URL: https://github.com/yhkaplan/curlgen
- Owner: yhkaplan
- License: mit
- Created: 2020-02-24T07:10:55.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-24T07:23:44.000Z (almost 5 years ago)
- Last Synced: 2024-11-06T05:42:20.585Z (3 months ago)
- Language: Swift
- Size: 9.77 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CurlGen
This Swift Package is a μframework for debugging with Swift Foundation's URLRequests, converting them to cURL commands that can easily be copy and pasted to execute or inspect details.
Example:
```sh
(lldb) po request.cURLCommand()curl -v https://www.github.com -X POST \
--data {"data": {"key": "value"}} \
--header "Accept=application/json" \
--header "Content-Type=application/json"
```## Prerequisites
- Xcode 11.0 or higher
## Installing
Just add the Swift Package to your Xcode project in Project settings, "Swift Packages."
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Acknowledgments
* Inspired by Alamofire's cURL command generator, I wanted something similar, but useable in cases where I didn't use Alamofire.
## TODO
- [ ] Put all urls, headers, and body in single quotes for shell escaping