开发者

When using Ajax with PHP, which of the following are necessary to verify success?

Which of the following answers are correct ?

  • HTTP ready state of TRUE
  • HTTP ready state of 4
  • HTTP status code <开发者_运维问答 400
  • HTTP status of 200
  • Data present in the response


both HTTP status of 200 and HTTP ready state of TRUE


In all my apps, I require only ready state 4 for success, which means as little as: the request is done and the response (if any) is available.

But like Madmartigan very wisely commented: define your version of success.


Usually, an HTTP ready state of 4 and HTTP status code of 200 is needed in order to guarantee that data has been successfully transferred back to your program.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜