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"
In reply to how to post an xml using REST::Client by KSHYAMKUMAR
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |