Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --offline flag to construct requests and print them in stdout without sending them #22

Open
talis-fb opened this issue Feb 19, 2024 · 0 comments
Labels
enhancement New feature or request 🐇 Small

Comments

@talis-fb
Copy link
Owner

talis-fb commented Feb 19, 2024

The objective is to replicate this feature in HTTPie (https://httpie.io/docs/cli/offline-mode). This will be applied in Basic request subcommand (like treq GET or treq POST) and treq run. When the --offline flag is used, instead build the request and submit it, the app should return the raw request would be made. This is useful when users want to check if the request he is gonna submit is right.

Additional Considerations:

It's necessary add a field in CliInput. Like "request_items" field another field called "request_options". The field should be passed to ViewCommandExecutor of Submit Request. There, should live a switch. It get and build request, and instead submit it, just prints it. Create a Executor just to this new behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🐇 Small
Projects
Status: No status
Development

No branches or pull requests

1 participant