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 new --url like flag on action get to show both .json and naked url for webactions #189

Open
rabbah opened this issue Sep 1, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@rabbah
Copy link
Contributor

rabbah commented Sep 1, 2020

Is your feature request related to a problem? Please describe.

When a web action is created, it can be invoked in two ways. One with a URI that adds a .json extension and without. The latter only works if the action actually returns a responses that conforms to the HTTP schema (e.g., has a body, status code and headers). If the body is missing when the latter URI is is used, the HTTP response is 204 No Content. This can be confusing for developers.

Rather than change the behavior of action get --url which currently return the naked URI (no .json), I think it would be better to add a new flag to list both URI. WDYT?

Describe the solution you'd like

> ... action get foo --url-all
The URL to invoke this web action is:
https://example.com/api/v1/web/namespace/package/foo.json

Or use this URL if your action result conforms to the HTTP web action schema:
https://example.com/api/v1/web/namespace/package/foo

Describe alternatives you've considered
An alternative is for --url to accept an optional value --url all.
What are some better flag names?

@meryllblanchet
Copy link

Thanks for the feature request, @rabbah !

@purplecabbage @Himavanth , wdyt about the proposal and how would it fit with both runtime and app plugins post refactoring?

cc @sarahxxu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants