Caching API responses while experimenting #6
dimo414
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I'm experimenting with an API call, especially to filter or post-process the response, it can be nice to invoke the API itself via
bkt
so that the raw response is cached. This saves time and resources without getting in the way.As an example, I was poking around at the NWS Weather API and wanted to use
jq
to display the relevant parts of the response in an ASCII table. It took several passes to get the behavior I wanted, and while the NWS API is fast and free there's no need to hit it repeatedly in a short time frame.This has several advantages over dumping the response to a file:
bkt --
to the front rather than splitting the pipeline into parts and adding redirects to/from files--force
Beta Was this translation helpful? Give feedback.
All reactions