Thanks. Could you suggest how to achive this using REST::Client POST request as well?

use strict; use warnings; use REST::Client; use Data::Dumper; my $server = '...'; my $port = '...'; my $path = '/cdx/abc/gsa/deliverables'; my $application_id = '...'; my $application_password = '...'; my $host = 'localhost'; my %fields = ( deliverable_file => ["$ENV{PWD}/sample.xml"], data_transaction_code => "SOA", file_name => "RRR-xxxxxxxxxx.mmddyyyy-hhmmss.ext", agency_task_order_parameter => "12345667890", contractor_service_request_number => "123456780123456789" , deliverable_type => "Notification", data_transaction_file_date => "2016-01-21", tags => ["tagSample1", "tagSample2"] ); my $url = "http://$host:$port/cdx/abc/gsa/deliverables"; #print Dumper(\@INC) . "\n"; my $client = REST::Client->new(); # add the headers '-H' lines $client->addHeader('ABC_APP_ID', $application_id); $client->addHeader('IABC_APP_PASSWORD', $application_password); $client->addHeader('Content-Type', 'form-data' ); # add the fields '-F' lines print( $client->buildQuery(%fields)); $client->POST($url);

In reply to Re^2: HTTP::Request::Common output format. by KSHYAMKUMAR
in thread HTTP::Request::Common output format. by KSHYAMKUMAR

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.