Created
August 11, 2018 16:31
-
-
Save shierro/461b75efd3f437324c7e659fa876a07d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onSaveClicked = () => { | |
const options = { | |
crossDomain: true, | |
credentials: 'include', | |
method: 'PUT', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: { | |
filename: this.state.name | |
} | |
}; | |
fetch('http://localhost:3000/api/manage/privacy', options) | |
.then(res => { | |
const jsonResp = res.json(); | |
console.log(jsonResp); | |
this.setState({ files: jsonResp.result }); | |
}) | |
.catch(console.error) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment