move HTTP tests to API routes