Example of using API for CORS