Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- handleSubmit = event => {
- event.preventDefault();
- axios({
- method: 'post',
- url: API,
- data: {
- user: this.state.user,
- password: this.state.password
- },
- withCredentials: false,
- responseType: 'json',
- responseEncoding: 'utf8'
- }).then(response => {
- if (response.statusText == "OK") {
- console.log('RESPONSE STATUS OK');
- user: response.data.user
- password: response.data.password
- console.log("Password" + this.state.password);
- console.log("User:" + this.state.user);
- } else {
- console.log("Return to login");
- }
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement