Skip to content

Add piping output to some command line #93

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

emaniacs
Copy link

This pr will enable piping the output into some command line.
if a line start with pipe(|) thats means all of output of curl command
will be pipe into that line e.g

http://localhost:8000
--silent

# this is global pipe command, https://stedolan.github.io/jq/
| jq .

--

--

# using global pipe commands

GET /v1/users

--

# using custom pip command

| jq '.name'

GET  /v1/users/1

--

# using custom pipe command
# sometimes the apps error and didnt give a proper json so jq will fail
# while parse the output, so we need to pipe it to file first

| tee /tmp/fail.log | jq '.name'

GET  /v1/users/1

This commit will enable piping the output into some command line.
if a line start with pipe(|) thats means all of output of curl command
will be pipe into that line e.g

```
http://localhost:8000
--silent

# this is global pipe command, https://stedolan.github.io/jq/
| jq .

--

--

# using global pipe commands

GET /v1/users

--

# using custom pip command

| jq '.name'

GET  /v1/users/1

--

# using custom pipe command
# sometimes the apps error and didnt give a proper json so jq will fail
# while parse the output, so we need to pipe it to file first

| tee /tmp/fail.log | jq '.name'

GET  /v1/users/1

```
Sometime pipe command contains colon(:) or equals(=) sign so we need to
ignore in the parseHeaders and parseVals
@fedreg-bn
Copy link

Any plans to merge this pr ☝️ ? Would be really useful

@ajukraine
Copy link

Switching to your branch, as it seems there are even no more fresh changes to plugin to merge :)

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

Successfully merging this pull request may close these issues.

3 participants