ruby - AFMotion Post with Token -


I have found a client in a Sinatra / Warden Remote API and Ruby Motion. How do I post with the authentication token and user object for initial registration (from customer)?

It's so low, not so much, I know. Basically I need to pass the remote API and a user object through a token

  def register_user (user) @client = AFMotion :: Client.build ("http: // local host: 9393 / register ") is the title" Accept "," application / json "request_serializer: json response_serializer: json end-end   

help

You can change the line that starts the @client object in its own way

  @client = AFMotion :: Client.build ("http: // localhost: 9393 /") When you want to do a post request, you must  
  "

@ client.post ({: 'token here', user: token 'user can register here'} ',' register '). Do the results. End of the result

You can get more information.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -