in reply to Re^3: Getting values with help of curl
in thread Getting values with help of curl
I can get the values in Postman as followed: management/api/v2/GetDeviceInfo?active=false. And since im new in the company and to programming I got the task to write a script that does exactly the same but in perl. As a hint I got the info that you can do it with help of curl and $ARGV and the code posted above can be shortend acording to my coworker.
#Edit, got the solution, saving here for the future monks: my $content = system ("curl -s -k -u admin:pass https://url/management/api/v2/GetDeviceInfo?$ARGV[0]"); Upon typing perl test.pl active=true, prints every true value.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Getting values with help of curl
by choroba (Cardinal) on Sep 01, 2022 at 14:18 UTC | |
by PerlMonkey22 (Novice) on Sep 07, 2022 at 09:50 UTC | |
by afoken (Chancellor) on Sep 07, 2022 at 10:46 UTC |