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.
In reply to Re^4: Getting values with help of curl
by PerlMonkey22
in thread Getting values with help of curl
by PerlMonkey22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |