https://github.com/below/curlrequest
Adds a `curlCommand` extension to `URLRequest`
https://github.com/below/curlrequest
Last synced: 5 months ago
JSON representation
Adds a `curlCommand` extension to `URLRequest`
- Host: GitHub
- URL: https://github.com/below/curlrequest
- Owner: below
- License: mit
- Created: 2021-06-01T08:32:14.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-01T08:59:45.000Z (almost 5 years ago)
- Last Synced: 2025-01-26T02:44:18.439Z (about 1 year ago)
- Language: Swift
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cURLRequest
This package adds a `curlCommand` extension to `URLRequest`, which should print an (escaped) cURL representation of your request to the terminal. It is mainly meant and useful for debugging
I have found some implementation on the web, but none as a SwiftPM module. Maybe I did not look hard enough, in the end I simply decided to re-invent the wheel myself.
The `curlCommand` supports:
* Headers
* JSON Encoded paylods
* URL Encoded paylods
I would be happy if this helps you in your project, and even happier if you have improvements
© 2021 Alexander von Below, Alex@vonBelow.COm
Published under the MIT License