attempt to implement post request via ajax json
successfully implement Ajax post request via api
fixing minor bugs and passing all test