diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json index 5b15c2b6c92..3aa97aca334 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json @@ -12,6 +12,7 @@ "dependencies": { "acorn": "^6.1.1", "antd": "^3.15.0", + "axios": "^0.18.0", "react": "^16.8.4", "react-dom": "^16.8.4", "react-highlight-words": "^0.16.0", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/Login.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/Login.js index f4faa2a3489..d6b1b3fa15f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/Login.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/Login.js @@ -1,6 +1,8 @@ import React from "react"; import {Typography, Row, Col, Form, Icon, Input, Button, Checkbox,} from 'antd'; import styles from './Login.less'; +import axios from 'axios'; + const {Title} = Typography; class Login extends React.Component { @@ -38,26 +40,36 @@ class NormalLoginForm extends React.Component { this.props.form.validateFields((err, values) => { if (!err) { console.log('Received values of form: ', values); + let data = "username="+values.username+"&password="+values.password+"&platform=publisher"; + axios.post('https://localhost:9443/api/application-mgt-handler/v1.0/login', data + ).then(res => { + console.log(res); + console.log(res.data); + }) } + }); - } + }; render() { - const { getFieldDecorator } = this.props.form; + const {getFieldDecorator} = this.props.form; return (