簡體   English   中英

是否可以使用Pudit或Devise on Rails創建有關用戶注冊的功能?

[英]Is it possible to create a functionality about user registration with Pudit or Devise on Rails?

我已經使用Pudit和Devise通過Web界面進行注冊和授權。

但是我也想通過REST接口來支持。 是否可以使用Pudit或Devise來做到這一點。 例如,發送此JSON以創建新用戶

{
    "email":"user@mail.com",
    "password":"password",
     "confirm_password":"password"
}

對的,這是可能的。 我已使用Devise gem使用RESTful API創建用戶注冊。 RESTful api,例如-http://APPLICATION_URL/api/v1/users/sign_up.json ,您可以按以下方式發布json參數{“ user”:{“ email”:“ user@mail.com”,“ password”:“密碼”,“ confirm_password”:“密碼”}}

謝謝,Kapil Chothe

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM