|
|
@ -36,18 +36,14 @@ class AppList extends React.Component {
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
payload.deviceType= deviceType;
|
|
|
|
payload.deviceType= deviceType;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const parameters = {
|
|
|
|
|
|
|
|
method: "post",
|
|
|
|
|
|
|
|
'content-type': "application/json",
|
|
|
|
|
|
|
|
payload: JSON.stringify(payload),
|
|
|
|
|
|
|
|
'api-endpoint': "/application-mgt-store/v1.0/applications/"
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//url-encode parameters
|
|
|
|
|
|
|
|
const request = Object.keys(parameters).map(key => key + '=' + parameters[key]).join('&');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//send request to the invoker
|
|
|
|
//send request to the invoker
|
|
|
|
axios.post(config.serverConfig.protocol + "://" + config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invokerUri, request
|
|
|
|
axios.post(
|
|
|
|
|
|
|
|
config.serverConfig.protocol + "://"+config.serverConfig.hostname + ':' + config.serverConfig.httpsPort + config.serverConfig.invokerUri+"/applications/",
|
|
|
|
|
|
|
|
payload,
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
headers: { 'X-Platform': config.serverConfig.platform }
|
|
|
|
|
|
|
|
}
|
|
|
|
).then(res => {
|
|
|
|
).then(res => {
|
|
|
|
if (res.status === 200) {
|
|
|
|
if (res.status === 200) {
|
|
|
|
//todo remove this property check after backend improvement
|
|
|
|
//todo remove this property check after backend improvement
|
|
|
|