use readline instead of detach_http