AngularJs $ http.post()請求不能正常工作
我想一個任務保存到我的分貝。如果assignedMember中的數據量超過175,它將不會發送404錯誤,但如果assignedMember中的數據量小於175,它將發送成功並存儲我的數據庫。對此有任何想法。我沒有什麼問題。請幫我謝謝
這是我的JSON數據
$scope.task=
{
"title": "My Title",
"description": "My Description",
"assignedMember": [
{
"userId": "51b701dae4b0dd92df2c32d1",
"status": "ASSIGNED"
},
{
"userId": "52de0811e4b04615ce7ed6bd",
"status": "ASSIGNED"
},
{
"userId": "559f8e97e4b0a5cdcd66bb76",
"status": "ASSIGNED"
},
.
.
.
.
.
.etc upto 500 data
]
}
這是我的職務的請求的API
var responsePromise = $http.post("api/tasks",$scope.task);
responsePromise.success(function(data, status, headers, config) {
alert("Data created successfully");
});
responsePromise.error(function(data, status, headers, config) {
alert("Error")
});
如果分配的成員規模超過175或在瀏覽器內容長度大於24580當我發送此json我得到404錯誤
如果指定的成員大小小於175或瀏覽器中的內容長度小於10080當我發送此json它會成功
如果我收到404錯誤我的瀏覽器控制檯是這樣
Request header
-------------
Host: localhost
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: application/json, text/plain,/
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json;charset=utf-8
Referer: http://localhost/login.do
Content-Length: 24580
Response header
--------------
Connection: close
Content-Encoding: gzip
Content-Type: text/html
Date: Thu, 15 Dec 2016 14:21:56 GMT
Server: nginx/1.10.1
Transfer-Encoding: chunked
是它在我的nginx服務器中的任何限制?請幫我
發佈請求沒有限制rit?並獲得請求被限制爲2048KB
其實我通過郵寄發送,所以我面臨什麼問題?
我不能理解姬,我會做什麼?請幫助我? –
我添加了〜client_body_in_file_only clean; client_body_buffer_size 32K; client_max_body_size 300M; sendfile on; send_timeout 300s;〜 –
但它不起作用 –