add functionality to use POST requests in ajax json request as well as GET