I am trying to write a javascript that can help me post JSON data to the website's json_server.php page to login successfully.
An example of the JSON data will be as follows:
{
"method":"validateUserAccountWithUsernameAndPassword",
"id":100000,
"params":[
"testname",
"password",
"empid"
]
}
There are two scenarios:
1) I tired the method mentioned in the post using javascript/ajax, but all I got was a blank page. This was tested by running the script from notepad++ to firefox browser.
2) I used the above JSON on a chrome extension called POSTMAN and it worked fine, passing the JSON string which returned with 200 OK, but not sure how it when through, as I see lots of tokens been passed.
I need to get a working javascript that can post JSON string successfully that will help me login successfully like in scenario 1 ?