micha / resty

Little command line REST client that you can use in pipelines (bash or zsh).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to assign output to variable

amitaibu opened this issue · comments

I assumed doing VAR=$(GET /foo) would work, but it doesn't. How can it be done?

hey @amitaibu, did you get an error?

You should try to code protect the subcommand: VAR="$(GET /foo)".
Tell me if it fix your problem

Worked, thanks. Closed in favor of #55