I'm not sure on the content ($json) variable I passed in the script. I assumed the below code works.
my $json = '[{"action":"http:/cisco.com/jnap/wirelessap/SetRadioSe +ttings","request":{"radios":[{"radioID":"RADIO_2.4GHz","settings":{"i +sEnabled":true,"mode":"802.11bgn","ssid":"vinoth","broadcastSSID":tru +e,"channelWidth":"Auto","channel":1,"security":"None"}}]}},{"action": +"http://cisco.com/jnap/guestnetwork/SetGuestNetworkSettings","request +":{"isGuestNetworkEnabled":false,"guestSSID":"vinoth-guest","guestPas +sword":"BeMyGuest","maxSimultaneousGuests":5,"broadcastGuestSSID":fal +se}}] '; my $req = HTTP::Request->new(POST=>$url); $req->header('content-type' => 'application/json'); $req->authorization_basic("admin", "admin"); $req->content($json);
In reply to Re^2: How to Post a HTTP Request for a JSON web page?
by vchinnat
in thread How to Post a HTTP Request for a JSON web page?
by vchinnat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |