"be consistent" | |
PerlMonks |
Re^3: Sample REST request & response codeby thanos1983 (Parson) |
on Sep 07, 2018 at 08:54 UTC ( [id://1221911]=note: print w/replies, xml ) | Need Help?? |
Hello Aldebaran, The quick answer to your question Could $host be a remote website with which I currently use sftp? is yes it can. The longer version and my recommendation is not to use HTTP/HTTPS to upload files. My module is a customization which in the background uses REST::Client to do all the communication. Further analysis why I do not recommend to use HTTP/HTTPS for uploading files?
Reference Source HTTPS or SFTP – which is best?. SFTP is a protocol designed for this purposes (file transfer) using SSH connections. If you ask my opinion I would continue using the Net::SFTP::Foreign module but with a small modification, I would use SSH keys instead of sending username and password. If you want to see a sample of code on how to use SSH keys connection Re: Net::SFTP::Foreign Password Authentication Hangs (UPDATED). There are many reasons on why to use SSH keys instead of password, the really fast answer is because it is way more secure and less communications between client/server. To conclude, yes it is possible to send a file through HTTP/HTTPS (SSL encryption) with the help of my module that uses REST::Client or directly modify it for your needs, but I would not recommend it unless if you did not had the ability to use SSH strictly HTTP/HTTPS. You also asked what is Snippet is the name that I used for the data that is send from the server. Let me know if you have more questions. BR / Thanos
Seeking for Perl wisdom...on the process of learning...not there...yet!
In Section
Seekers of Perl Wisdom
|
|