Move search logic to search method

Keep the http layer generic

Signed-off-by: Tim Smart <tim@fostle.com>