absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.42k stars 665 forks source link

MG-2025 - CLI : Flag to print only curl output #2242

Closed JeffMboya closed 1 week ago

JeffMboya commented 1 month ago

What type of PR is this?

This is a feature because it adds the ability to print only curl output in the CLI.

What does this do?

This PR adds a new flag --curl to the CLI. When this flag is used, the CLI will print the actual request sent as a cURL command. This will be useful for debugging and for users to visualize the request sent by the CLI/SDK.

The implementation uses the http2curl library to convert http requests to cURL commands.

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No.

Did you document any new/modified feature?

No

arvindh123 commented 2 weeks ago

If this PR is Approved and ready for merge, then we need to create Ticket in Magistrala docs to update CLI docs https://github.com/absmach/magistrala-docs/issues/new

JeffMboya commented 2 weeks ago

If this PR is Approved and ready for merge, then we need to create Ticket in Magistrala docs to update CLI docs https://github.com/absmach/magistrala-docs/issues/new

@arvindh123 https://github.com/absmach/magistrala-docs/issues/192