@doctorweb/endpoints
v1.3.0-alpha.7
Published
Fetch (ECMA 6) library wrapper
Downloads
54
Maintainers
Readme
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: "[email protected]"})
.then(sucesso => console.log(sucesso)) // JSON
.catch(err => console.log(err))