move more request logic out into ruby.