Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $command = <<'END'; curl 'https://tax-calculator-api.taxfoundation.org/taxcalc/tcja_submit +' -H 'Origin: https://taxfoundation.org' -H 'Accept-Encoding: gzip, d +eflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'User-Agent: Mozi +lla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like + Gecko) Chrome/69.0.3497.100 Safari/537.36' -H 'content-type: applica +tion/json' -H 'Accept: */*' -H 'Referer: https://taxfoundation.org/20 +18-tax-reform-calculator/' -H 'Connection: keep-alive' --data-binary +$'{"filing_status": 1, "child_dep": 2, "nonchild_dep": 0, "ordinary_i +ncome1": 150000, "ordinary_income2": 0, "business_income": 0, "ss_inc +ome": 0, "qualified_income": 0, "401k_contributions": 0, "medical_exp +enses": 0, "sl_income_tax": 0, "sl_property_tax": 0, "interest_paid": + 0, "charity_contributions": 0, "other_itemized": 0}' --compressed END print $command; my $data = `$command` or die "$!\n"; print Dumper $data;
|
|---|