开发者

Why do we set status response?

开发者 https://www.devze.com 2023-02-18 04:48 出处:网络
In many tutorials, i Have seen the code below :开发者_如何学Python response.setStatus( ...); What is the purpose of this?Assuming that response refers to an HTTP response, the setStatus() method is

In many tutorials, i Have seen the code below :开发者_如何学Python

response.setStatus( ...);

What is the purpose of this?


Assuming that response refers to an HTTP response, the setStatus() method is used to let the user-agent know whether the result of the HTTP request is OK, or if there was some kind of Error.

0

精彩评论

暂无评论...
验证码 换一张
取 消