Licence
MIT
Version
0.1.11
Deps
9
Size
117 kB
Vulns
0
Weekly
0
srvup.js
The official srvup javascript client. Useful for API calls and UI elements.
Install
npm install --save srvup
Docs
Basic Usage
Read the docs for more.
GET requests
import React, { Component } from 'react'
import srvup from 'srvup'
srvup.api(API_PUBLIC_KEY)
class Example extends Component {
handleResponse = (responseData, status) =>{
console.log(responseData, status)
// set your state here
}
componentDidMount(){
const includeUserAuthToken = false
srvup.get('/posts/', this.handleResponse, includeUserAuthToken)
}
render () {
return (
<h1>Srvup Client<h1>
)
}
}
License
MIT srvup