ruby on rails - How to pass query string and POST params in grape -
ruby on rails - How to pass query string and POST params in grape -
i using grape
restful api
. want create post method post
parameters , query string parameters. how utilize them? can give me nice example?
i know pass query string params(key, sign) follows. how utilize post params. want pass post params (say name,id). how in code.
https://www.abc.com/api/v2/list?key=abc&sign=xyz
i have code follows
post :new_user key = params[:key] sign = params[:sign] httparty.post("https://www.abc.com/api/v2/list?key=abc&sign=xyz") end
in add-on want pass post params (say name,id). how that?
ruby-on-rails ruby-on-rails-4 grape grape-api
Comments
Post a Comment