ruby - Webservice POST not displaying requested parameters using rest client in rails 2.3.8 -
i have headers set accept application/json , content-type application/json post webservice. follwing requested parameters:
{ "occupantid": 162921, "buildingid": 13294, "quizid": 397, "score": 3, "result": "fail" }
routes.rb
map.connect '', :controller => 'quiz_v2', :action => 'record_quiz_result', :conditions => { :method => :post }
when try see params in controller's action
def record_quiz_result p params end returned controller_name , action_name
i dont know happening here, may missed something.
goto headers => custom header
1.content-type name , application/x-www-form-urlencoded value , save it.
2.now enter ur params in body should available , accessible through params hash in rails
hope helps