I am sending a post request using Angular $http
with a request URI between 10,000 and 11,000 characters to an Apache (shared-hosting) server.
The server rejects my connection attempt, saying HTTP 414 Request-URI Too Large
My question is, why is this happening at a POST request?
According to these two posts:
The 8192 limit the server is telling me about should only apply to GET requests, unless I am misunderstanding something?
So am I doing something wrong or is the shared host misconfigured?
Because it is shared hosting, I don't have access to Apache configuration files.
Assuming I can't get around a weird POST limit on the server, how can I send this large request to a PHP script? Do I have to take advantage of SESSION
to store, for example, the order JSON on a first $http
and then combine this SESSION
data with the rest of a second $http
to get the complete order?
Does that make sense?
My POST request:
$http({
method: 'POST',
url: 'https://www.example.com/placeanorder',
params: {
order: angular.toJson($scope.order),
orderProperties: angular.toJson($scope.Oproperties),
token: token,
totalCost: $scope.totalPrice,
shippingCost: $scope.shippingCost,
shippingProperties: angular.toJson($scope.shippingProperties)
}
})