Which REST operation (GET, PUT, or POST) for validating information?

后端 未结 4 1311
终归单人心
终归单人心 2020-12-29 05:12

My users enter a few information fields in an iOS app. This information must be validated on my server, which has a RESTful API. After validation the UI of the iOS app chang

4条回答
  •  我在风中等你
    2020-12-29 05:18

    I use the same scenario as you and use PUT for it. You have to ask yourself: "when I send the same request twice, does this make a different state on server?" If yes, use POST, if no use PUT.

提交回复
热议问题