简体   繁体   中英

Codeigniter REST API, difference between PUT and POST

I am making an API for my site using Philip Sturgeon's REST server and i am in a little dilemma. I am not shure which action to use for edit and which for create. POST or PUT?

The POST method is usually used for create operations,
and the PUT is used for edit/update operations.

Put methods are Idempotent whereas Post methods are non-Idempotent. means put are safely repeatable and post are not safely repeatable

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM