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

[feature request] Save JSON API paths #32

Closed
vinsworldcom opened this issue Mar 17, 2023 · 3 comments
Closed

[feature request] Save JSON API paths #32

vinsworldcom opened this issue Mar 17, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@vinsworldcom
Copy link

In the "JSON from file and APIs" form, it would be nice to remember - say the last 10 - "Get JSON from APIs" entries and have them auto-populated when the form opens.

image

I realize just populating that window would mean fetching them all (again) when pressing the "Send requests" button. I think it would be relatively easy to store in the config file up to 5 or 10 most-recently-used URLs. Just how to make them accessible in this window for each recall?

Cheers.

@molsonkiko molsonkiko added the enhancement New feature or request label Mar 17, 2023
@molsonkiko
Copy link
Owner

Good idea! Probably a good way to do it is to store "sessions" (probably implemented as a JSON config file mapping session names to arrays of URLs).
Since you're the first person to ask for anything related to the grepper form, I'd be curious if you can think of any other improvements I could make.

@molsonkiko
Copy link
Owner

molsonkiko commented Mar 18, 2023

The most recent commit implements this (minus the "sessions" feature, which doesn't feel like enough of a win to be worthwhile unless someone asks).
Other ideas:

  1. maybe add configurable startup actions, like
// grepperFormStartupActions.json
{
    "query": "@.*[:]{foo: @.foo, len_bar: s_len(@.bar)}", // for each URL queried, get a JSON array, from which you select the foo attribute and the length of the bar attribute of each item
    "urls": [
        "https://foo.gov.api?user=bar",
        "https://foo.gov.api?user=baz",
    ]
}

@molsonkiko
Copy link
Owner

I'd say the new implementation is a minimum viable product. I don't get the impression that this form is very widely used, and if someone is really unhappy with having to delete the URLs that auto-populate the field (unreasonable IMO because they can just Ctrl+A and then backspace), I might re-implement it in some other way. I'm open to suggestions.

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