Skip to content

Instantly share code, notes, and snippets.

@stravid
Last active October 16, 2015 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stravid/7a0aa7952b735d6218ba to your computer and use it in GitHub Desktop.
Save stravid/7a0aa7952b735d6218ba to your computer and use it in GitHub Desktop.
Lotus JSON Body Parsing
module Api::Controllers::Players
class Create
include Api::Action
expose :player
def call(params)
self.body = params[:data]
end
end
end
curl 'http://localhost:2300/api/players' --data-binary '{"data":{"attributes":{"name":"David"},"type":"players"}}' --compressed
{"data":null}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment