Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loginAlfresco(user, pass)
- {
- return fetch(alfrescoLocal + "api/login",
- {
- method: 'post',
- dataType: 'json',
- body: JSON.stringify(
- {
- username: user,
- password: pass
- })
- })
- .then((res) => res.json())
- .then(data => alert(data))
- .catch(error => alert("Error" + error))
- };
- loginAlfresco() {
- loginAlfresco(this.state.username, this.state.password)
- .then((data) =>
- this.setState({ticket: data})
- ).catch((error) =>
- alert(error)
- )
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement