# How I will do http post call?

**URL:** <https://discuss.elastic.co/t/how-i-will-do-http-post-call/167114>\
**Category:** Kibana\
**Created:** [February 5, 2019, 12:01pm UTC](https://discuss.elastic.co/t/how-i-will-do-http-post-call/167114 "2019-02-05T12:01:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shivendra\_Prakash\_Sh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shivendra_prakash_sh/32/38161_2.png) [@Shivendra\_Prakash\_Sh](https://discuss.elastic.co/u/Shivendra_Prakash_Sh)\
**Post date:** [February 5, 2019, 12:01pm UTC](https://discuss.elastic.co/t/how-i-will-do-http-post-call/167114/1 "2019-02-05T12:01:30Z")

</div>

Hi Team,

I will try like this :

$scope.applyAbsolute = function () {  
$scope.onFilterSelect({  
from: moment($scope.absolute.from),  
to: moment($scope.absolute.to),  
var startDate = ($scope.absolute.from);  
var endDate = ($scope.absolute.to);  
var today = new Date();  
var date\_end = new Date(endDate);  
var date\_start = new Date(startDate);  
var dataObj = {  
startTime: $scope.absolute.from,  
endTime: $scope.absolute.to  
};  
$http.post('/rest/v1/demo/postJob', dataObj)  
.success(function(response) {  
var data = response.data;  
if(data){  
console.log(data);  
}});  
});  
};

but during the kibana build, it is throwing the exception , Please check below :

17 error Linux 4.4.120-92.70-default  
18 error argv "/root/.nvm/v6.14.4/bin/node" "/root/.nvm/v6.14.4/bin/npm" "run" "build" "--" "--skip-os-packages" "--release"  
19 error node v6.14.4  
20 error npm v3.10.10  
21 error code ELIFECYCLE  
22 error kibana@5.6.13 build: `grunt build "--skip-os-packages" "--release"`  
22 error Exit status 3  
23 error Failed at the kibana@5.6.13 build script 'grunt build "--skip-os-packages" "--release"'.  
23 error Make sure you have the latest version of node.js and npm installed.  
23 error If you do, this is most likely a problem with the kibana package,  
23 error not with npm itself.  
23 error Tell the author that this fails on your system:  
23 error grunt build "--skip-os-packages" "--release"  
23 error You can get information on how to open an issue for this project with:  
23 error npm bugs kibana  
23 error Or if that isn't available, you can get their info via:  
23 error npm owner ls kibana  
23 error There is likely additional logging output above.  
24 verbose exit [1, true]

Please suggest to me what I should do the changes....

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [February 5, 2019, 8:20pm UTC](https://discuss.elastic.co/t/how-i-will-do-http-post-call/167114/2 "2019-02-05T20:20:55Z")

</div>

Does the server start without your plugin?

---

<div class="post-metadata">

**Author:** ![Shivendra\_Prakash\_Sh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shivendra_prakash_sh/32/38161_2.png) [@Shivendra\_Prakash\_Sh](https://discuss.elastic.co/u/Shivendra_Prakash_Sh)\
**Post date:** [February 6, 2019, 4:31am UTC](https://discuss.elastic.co/t/how-i-will-do-http-post-call/167114/3 "2019-02-06T04:31:43Z")

</div>

Yes without my changes .....

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 6, 2019, 4:31am UTC](https://discuss.elastic.co/t/how-i-will-do-http-post-call/167114/4 "2019-03-06T04:31:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
