KSHYAMKUMAR has asked for the wisdom of the Perl Monks concerning the following question:
I have a requirement to send an xml using REST API through perl. below is the unix curl command which does exactly the same thing.
I noticed that REST::Client can be used to send the REST requests from Perl. post method syntax is : POST ( $url, $body_content, %$headers )
could some one help me figure out how to populate below required fields based on the POST syntax which was described above??
curl -X POST -H "Content-Type: multipart/form-data" -H "ABC_APP_ID: <Application_ID>" -H "IABC_APP_PASSWORD: <Application_Password>" -F "deliverable_file=@sample.xml" -F "data_transaction_code=SOA" -F "file_name=RRR-xxxxxxxxxx.mmddyyyy-hhmmss.ext" -F "agency_task_order_parameter=12345667890" -F "contractor_service_request_number=123456780123456789" -F "deliverable_type=Notification" -F "data_transaction_file_date=2016-01-21" -F "tags=["tagSample1", "tagSample2"]" "http://<server>:<port>/cdx/abc/gsa/deliverables"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to post an xml using REST::Client
by spazm (Monk) on Apr 07, 2016 at 21:41 UTC | |
by KSHYAMKUMAR (Acolyte) on Apr 07, 2016 at 21:53 UTC | |
by 1nickt (Canon) on Apr 08, 2016 at 19:53 UTC | |
by KSHYAMKUMAR (Acolyte) on Apr 08, 2016 at 20:15 UTC | |
by 1nickt (Canon) on Apr 08, 2016 at 20:46 UTC | |
by KSHYAMKUMAR (Acolyte) on Apr 07, 2016 at 21:57 UTC | |
by spazm (Monk) on Apr 07, 2016 at 22:19 UTC | |
by KSHYAMKUMAR (Acolyte) on Apr 08, 2016 at 01:49 UTC |