Skip to content

Conversation

@tijmenbruggeman
Copy link

When fetching the result of a compression, users call the method result(). This will do a request to an url like:
https://api.tinify.com/output/<randomstring>
This will resolve to a file.

Because it is possible to add commands to this request such as and other commands, the result would be a GET request with a body. Although this is possible, it is not recommended.

Therefor we should change the method to a POST. Shouldn't be a breaking change so patched the version.

- Fix inverted boolean logic for has_commands check
- Ensure GET is used when no commands are present
- Ensure POST is used when commands are present
- Add comprehensive tests for both GET and POST scenarios
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.

1 participant