应用程序初始化-接受状态码 [英] Application Initialization - status codes accepted

查看:105
本文介绍了应用程序初始化-接受状态码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用应用程序初始化时,可以接受哪些HTTP状态代码来证明该站点可以正常运行?有人告诉我几乎所有状态代码都可以接受,而不仅仅是200.

When using application initialization, what HTTP status codes are accepted as proof that the site is operational?  I've been told that pretty much any status code is accepted, not just 200.

推荐答案

Dirk,这取决于您所说的操作".如果按操作表示成功,则2xx类(200 -206)中的状态代码表示成功请求,可以证明该站点正在运行.但是,服务器响应 可能会根据请求尝试实现的内容而有所不同.例如,"201 Created"意思是请求被满足并且一个或多个新资源被创建并且"202 Accepted"被接受.表示该请求已被接受以进行处理,但是 处理尚未完成.希望有帮助


Hi Dirk, it depends on what you mean by "operational". If by operational, you mean successful, then status codes in the 2xx class (200 -206) represent a successful request, which can be proof that the site is working. However, server response might differ based on what the request was attempting to achieve. For example, "201 Created" means the request was fulfilled and one or more new resources was created and "202 Accepted" means the request was accepted for processing, but the processing has not been completed. Hope that helps



这篇关于应用程序初始化-接受状态码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆