UPDATE: I Figured it out. Was a URL issue, which redirected and cleared the POST before it was sent to the server.
$(\'#addbtn\').on(\'click\',function() {
$.a
If GET request works but POST doesn't it's most usually the issue with redirect. That said, while the request initially accessed the first URL and got redirected to another URL then all the POST data were not forwarded along to another URL. Therefore all the data gets lost.
Some common cases that might occur (depending on server configuration):
You get the idea. If you look in network panel and notice that there is no data sent but response was 200 OK then it's good idea to check if Request URL in network panel is the one that you specified in your code. Although this will be possible only in modern browsers. In older browsers you won't even know that URL has been redirected.
For Example (see that "en/" is missing in my request url):