Ruby Net::Http split write and read operation for non-blocking

136 views Asked by At

I'm fairly new to Ruby and I'm looking at using the Net::Http class to post some data and then read in the response once I'm ready for it. Ideally I'd like to be able to split the code into two functions, one which connects and writes the request, and the second which is called for reading the response.

Is this possible to do without any third-party libraries, or using sockets? Checking the Ruby docs it sounds like it should be do-able.

0

There are 0 answers