I am trying to use Chrome Dev for debugging the following Angular post request :
$http.post("http://picjboss.puma.lan:8880/fluxpousse/api/flow/createOrUpdateHeader", flowHeader)
After running the statement with right-click / evaluate, I can see the post in the network panel with a pending state. How can I get the result or "commit" the request and leave easily this "pending" state from the dev console ?
I am not yet very familiar with JS callbacks, some code is expected. Thanks.
EDIT
I have tried to run from the console :
$scope.$apply(function(){$http.post("http://picjboss.puma.lan:8880/fluxpousse/api/flow/createOrUpdateHeader", flowHeader).success(function(data){console.log("error "+data)}).error(function(data){console.log("error "+data)})})
It returns : undefined
EDIT
The post I am trying to solve generate an HTTP 400. Here is the result :
Request URL:http://picjboss.puma.lan:8880/fluxpousse/api/flow/createOrUpdateHeader
Request Method:POST
Status Code:400 Mauvaise Requ?te
Request Headersview source
Accept:application/json, text/plain, /
Accept-Encoding:gzip,deflate,sdch
Accept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Connection:keep-alive
Content-Length:5354
Content-Type:application/json;charset=UTF-8
Cookie:JSESSIONID=285AF523EA18C0D7F9D581CDB2286C56
Host:picjboss.puma.lan:8880
Origin:http://picjboss.puma.lan:8880
Referer:http://picjboss.puma.lan:8880/fluxpousse/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
X-Requested-With:XMLHttpRequest
Request Payloadview source
{refHeader:IDSFP, idEntrepot:619, codeEntreprise:null, codeBanniere:null, codeArticle:7,…}
cessionPrice: 78
codeArticle: "7"
codeBanniere: null
codeDateAppro: null
codeDateDelivery: null
codeDatePrepa: null
codeEntreprise: null
codeFournisseur: null
codeUtilisateur: null
codeUtilisateurLastUpdate: null
createDate: null
dateAppro: null
dateDelivery: null
datePrepa: null
hasAssortControl: null
hasCadenceForce: null
idEntrepot: 619
isFreeCost: null
labelArticle: "Mayonnaise de DIJON"
labelFournisseur: null
listDetail: [,…]
pcbArticle: 12
pvc: 78
qte: 78
refCommande: "ref"
refHeader: "IDSFP"
state: "CREATED"
stockArticle: 1200
updateDate: null
Response Headersview source
Connection:close
Content-Length:996
Content-Type:text/html;charset=utf-8
Date:Fri, 08 Nov 2013 15:19:30 GMT
Server:Apache-Coyote/1.1
X-Powered-By:Servlet 2.5; JBoss-5.0/JBossWeb-2.1