0.1.3 • Published 3 years ago

fvi-axios-client v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

FVI - Axios Client

Esta biblioteca é resposável por realizar chamadas HTTP à um servidor de maneira fácil e rápida utilizando a lib axiosjs.

Configuração

Para configurarmos esta biblioteca devemos passar como parâmetro um Object contendo as informações abaixo:

{
    url: 'http://google.com',
    timeout: 1000,
    headers: {
        'Content Type': 'text/html'
    }
}

Modo de Usar

const client = app({
  url: 'http://localhost:80',
  timeout: 3000,
})

client
  .get('/support/ping')
  .then(res => res.data)
  .then(console.log)
  .catch(done)

client
  .post('/support/ping')
  .then(res => res.data)
  .then(console.log)
  .catch(done)

client
  .put('/support/ping')
  .then(res => res.data)
  .then(console.log)
  .catch(done)

client
  .delete('/support/ping')
  .then(res => res.data)
  .then(console.log)
  .catch(done)

fvi-axios-client

  • npm run compile: Executa a limpeza dos arquivos e diretorios.
  • npm run debug-test: Executa os testes unitários com o DEBUG ativo.
  • npm run test: Executa os testes unitários.
  • npm run debug-dev: Executa os testes unitários e espera por alterações com o DEBUG ativo.
  • npm run dev: Executa os testes unitários e espera por alterçãoes.
  • npm run prod: Executa o código com NODE_ENV=production.
  • npm run coverage: Executa os testes unitários e retorna a cobertura dos códigos através do nyc
  • npm run release: Inicia uma nova release de versão incrementando o patch, git flow release start.
  • npm run release:minor: Inicia uma nova release de versão incrementando o minor, git flow release start.
  • npm run release:major: Inicia uma nova release de versão incrementando o major, git flow release start.
  • npm run release:finish: Finaliza a release, ou seja, realiza o git flow release finish.
0.1.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago