@doctorweb/endpoints
1.3.0-alpha.7 • Public • Published
Install
npm install @doctorweb/endpoints
Contribuir
git clone https://bitbucket.org/doctorwebbrasil/endpoints.git
cd endpoints
npm install
Uso
1. GET de um objeto JSON
import {API} from '@doctorweb/endpoints'
let server = new API('http://localhost:8000', null)
server.post(endpoints.register, {username: "joaozinho", password: "1234", email: "joao.carneiro@gmail.com"})
.then(sucesso => console.log(sucesso)) // JSON
.catch(err => console.log(err))
2. Parâmetros e Headers Constantes
Package Sidebar
Install
npm i @doctorweb/endpoints
Weekly Downloads