I want to publish the data and display the HTTP response sent by the server in the browser, but I am stuck in the browser. Nothing is displayed.
I checked the wired shark that the server is sending a json response, but nothing is displayed in the browser, and I want to get the body of the response and analyze it, and then display it to the user.
And is there any way to get the details of the form, and then wrap it on a variable and send it to the server
<!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $.post( "http://192.168.0.135:8080/uid", { "type" : "CREATE_ACCOUNT", "data" : '{ "hardwareID" : "SAM1234567890123", "name" : "Jain", "emailID" : " jain@gmail.com ", "password" : "dgbedbeifkfk" }' }, function(data,status) { alert("Data: " + data + "\nStatus: " + status); } ); }); }); </script> </head> <body> <button>Send an HTTP POST request to a page and get the result back</button> </body> </html>
user2173955
source share