Submission of data with status 200, but empty
Submission of data with status 200, but empty
klermann
Posts: 277Questions: 67Answers: 1
I am trying to send the completed data from the Datatable editor by form, the status 200m tells me that the data is being submitted normally, but on the server I verify that the submission is empty or null. I would like to know how I can solve this problem and how to convert the json data before sending it to the server because on the server I can quietly handle this data in java
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
What are you using on the server-side? If you click on the "Headers" tab in your browser's "Network" inspector for the request in question, it will show you want parameters were submitted to the server.
Allan
This is like 200 ok status, but on the server this is returning empty.
I could not put a console.log () in the editor to see the output of the data, where do I put console.log () in the editor to identify the data being sent?
If you scroll down in the Headers section, it should show you want the data is that is being submitted. I think you are looking only at the response if you are seeing a 200 OK.
Allan
I think it's the information you're talking about in the params - Form data tab. Is this the output format?
action create
data[0][descricaoReceita] Demo
data[0][dataReceita] 2017-08-18
data[0][valorReceita] 23434234
data[0][receitaFixa] 0
data[0][receitaCor] 4234234
data[0][minhasContas][nome] +Demo
data[0][tipoReceitas][nome] tipoReceitas.nome
You know why my controller is getting null?
I am trying to send the completed data from the Datatable editor by form, the status 200m tells me that the data is being submitted normally, but on the server I verify that the submission is empty or null.
That's the one. That shows that the client-side is most certainly sending the data to the server. I'm afraid I can't say why the server isn't seeing it as I don't know what you are using on the server-side. In PHP
$_POST['action']
would get the action parameter - but I doubt you are using PHP.Allan
I'm using java and I solved the problem! I only managed to get the object after I discovered that it is memory reference, does it really happen?
Good to hear you've got to hear you've got it working. I can't really help with any Java stuff I'm afraid. I haven't used it much.
Allan