const FETCH_HEADERS = { 'X-Requested-With': 'fetch' } function proxyUrl(path) { return `/api/proxy${path}` } export const certidaoService = { consultar(documento) { return $fetch(proxyUrl('/publico/certidao/consultar'), { headers: FETCH_HEADERS, query: { documento }, }) }, emitir(documento, tipoCertidao) { return $fetch(proxyUrl('/publico/certidao/emitir'), { headers: FETCH_HEADERS, query: { documento, tipoCertidao }, responseType: 'arrayBuffer', }) }, }