You are right @ridoo , i had first set "application/json" and was sending data from jquery ajax after serializing the form data but it was throwing server 415 error