var form_data={ "username": $('#username').val(), "password": $('#password').val(), } $.post({ url: server_url + "auth/signin", contentType: "application/json", data : JSON.stringify(form_data), success : function(response) { console.log("Calling",response); }, error: function (error) { console.log(error); } });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter