Access to XMLHttpRequest at from origin 'http://localhost:8100' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. code example
Example: viacep Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
npm install --save cep-promise
...
import * as cep from 'cep-promise'
cep('05010000')
.then(console.log)