File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ function injectProxy (Service) {
1515
1616export const CepAbertoService = isBrowser ( ) ? injectProxy ( CepAberto ) : CepAberto
1717export const CorreiosService = isBrowser ( ) ? injectProxy ( Correios ) : Correios
18- export const ViaCepService = ViaCep
18+ export const ViaCepService = isBrowser ( ) ? injectProxy ( ViaCep ) : ViaCep
Original file line number Diff line number Diff line change 33import fetch from 'isomorphic-unfetch'
44import ServiceError from '../errors/service.js'
55
6- export default function fetchViaCepService ( cepWithLeftPad ) {
7- const url = `https://viacep.com.br/ws/${ cepWithLeftPad } /json/`
6+ export default function fetchViaCepService ( cepWithLeftPad , proxyURL = '' ) {
7+ const url = `${ proxyURL } https://viacep.com.br/ws/${ cepWithLeftPad } /json/`
88 const options = {
99 method : 'GET' ,
1010 mode : 'cors' ,
You can’t perform that action at this time.
0 commit comments