move HTTP REST outside engine

so that other pkg can reuse, avoid circular import