Aditya
Aditya

Reputation: 431

Getting ERR_EMPTY_RESPONSE when posting http request to local host in angular-js framework

<$http.post('http://localhost:8383/HTML5Application1/',{text:'Hello'},{params:{id:'5'}});>

I m new to angularJS and http request's , when I'm posting this request and checking the same in Chrome dev tool ,err_empty_request error is coming.

Can any one guide what I'm doing wrong ?

Upvotes: 0

Views: 3686

Answers (1)

Liad Livnat
Liad Livnat

Reputation: 7475

use the following code instead:

var controller_data = {"text":"hello","id":"5"};
$http({url: 'http://localhost:8383/HTML5Application1/' , method: "POST",withCredentials: true,data:controller_data});

Upvotes: 1

Related Questions