Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^3: Sample REST request & response code

by thanos1983 (Parson)
on Sep 07, 2018 at 08:54 UTC ( #1221911=note: print w/replies, xml ) Need Help??

in reply to Re^2: Sample REST request & response code
in thread Sample REST request & response code

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?

HTTP and HTTPS are also stateless protocols. They may require new conn +ections for each transfer, and so they may not be suitable if a large + number of files need to be transferred.

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!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1221911]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2019-02-21 18:23 GMT
Find Nodes?
    Voting Booth?
    I use postfix dereferencing ...

    Results (114 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!