gpt4 book ai didi

java - REST API 中幂等和安全 HTTP 方法之间的区别

转载 作者:可可西里 更新时间:2023-11-01 16:10:49 27 4
gpt4 key购买 nike

PUT方法怎么能做到幂等而不安全呢?谁能解释一下?

HTTP Method   Idempotent      Safe
OPTIONS yes yes
GET yes yes
HEAD yes yes
PUT yes no
POST no no
DELETE yes no
PATCH no no

最佳答案

Safe method 内部(资源)没有任何改变

Safe methods are methods that can be cached, prefetched without any repercussions to the resource.

Idempotent method不会外部改变任何东西(响应)

idempotent HTTP method is a HTTP method that can be called many times without different outcomes.

关于java - REST API 中幂等和安全 HTTP 方法之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56729786/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com