Skip to content

Instantly share code, notes, and snippets.

@Komock
Created July 6, 2018 13:49
Show Gist options
  • Save Komock/ddc2da464fb7c9f02f03481b2b825827 to your computer and use it in GitHub Desktop.
Save Komock/ddc2da464fb7c9f02f03481b2b825827 to your computer and use it in GitHub Desktop.
//==== User ====//
createUser(body, scenario = 'preliminary') {
return window.fetch(`${API_DOMAIN}user/create?access-token=${API_TOKEN}&scenario=${scenario}`, {
method: 'POST',
headers: new Headers({ 'Content-Type': 'application/json' }),
body: JSON.stringify(body)
})
.then(res => res.json());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment