Move network requests into a thread