The .venv and dist directories are now ignored by git. The to_curl function in curlify2 is now a class method, which improves readability and maintainability. The version in pyproject.toml is now 2.0.0 to reflect the changes made.
📦 chore(pyproject.toml): add responses package
The responses package is added to the project dependencies in the pyproject.toml file. This package is used for mocking HTTP requests in tests.
🐛 fix(curlify.py): fix body decoding
✨ feat(app.py): add endpoint to convert http request to curl command
The body decoding was fixed in curlify.py. The method now returns the decoded body if it is a bytes object. In app.py, a new endpoint was added to convert an HTTP request to a curl command. The endpoint receives a URL via a POST request, sends a GET request to the URL, and converts the request to a curl command using curlify. The command is then returned to the user.
🎨 style(README.md): refactor code to use Curlify class instead of to_curl function The code has been refactored to use the Curlify class instead of the to_curl function from the curlify2 module. This improves readability and makes the code more concise.
1 file changed, 5 insertions(+), 7 deletions(-)
screenshots
<img width="1354" alt="Screenshot 2023-06-09 at 12 06 58" src="https://github.com/marcuxyz/curlify2/assets/9499562/aa52629b-dd96-4a89-a7f9-2a5c7546a486">