Hi @aakhmerov
Since the Web-Application i am building will be deployed globally, So i do not know whether it will be only inside the firm or will be accessible by client also.
In case if it is made the second way, The proxy configuration won’t work at client remote location.
My Web application is Running in Node-Express in which i am sending request via AngularJs HTTP.GET/POST.
> “use strict”;
> var camunda = angular.module(‘camunda’,[]);
> camunda.controller(‘camundaApi’,["$http","$rootScope", function($http,$rootScope) {
> $rootScope.obj={
> “variables”: {
> “creditor”: {“value”:“Niall”,“type”:“String”},
> “amount”:{“value”:“100”,“type”:“String”},
> “invoiceNumber”:{“value”:“123”,“type”:“String”}
> }
> };
> var parameter = {“variables”: {“creditor”: {“value”:“Niall”,“type”:“String”},“amount”:{“value”:“100”,“type”:“String”},“invoiceNumber”:{“value”:“123”,“type”:“String”}}};
> $http({
> method: ‘POST’,
> headers: ‘Content-Type: application/json’,
> url: ‘http://localhost:8080/engine-rest/process-definition/key/invoice/submit-form’,
> body: JSON.stringify({“variables”: {“creditor”: {“value”:“Niall”,“type”:“String”},“amount”:{“value”:“100”,“type”:“String”},“invoiceNumber”:{“value”:“123”,“type”:“String”}}})
> }).then(function(response) {
> // return response.data;
> console.log(response.data);
> });
> }]);
My Angular Controller code is given above. This sends request on every reload of the page.
After sending this request this gave NO ERROR, but the status code 415- Unsupported Format.
Even after i am converting my data into string. and when i don’t convert into string it throws following ERROR.
> Apache Tomcat/8.0.24 - Error reportH1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}
HTTP Status 415 - Cannot consume content type
type Status report
message Cannot consume content type
description The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
Apache Tomcat/8.0.24
Thanking in Advance
Shohil Sethia