You cannot do it using an http_poller input. No ruby filters will have executed when the input runs and there is no way to pass state to it.
You might be able to use an http filter. You could use any of the inputs that have a schedule option to create dummy events, then use a combination of ruby and http filters to do the work on that schedule.
It feels a bit like like solving the Towers of Hanoi problem in sendmail.cf. It can be done, and it is interesting to see it work, but that doesn't make it a good idea