Annotations can also dynamically extract information from HTTP requests and map application-generated exceptions to HTTP response codes.
注释还可以动态地提取HTTP请求中的信息,以及把应用程序生成的异常映射到http响应码。
The test_list test case asserts a response of :success, but it could assert :redirect (for an HTTP redirect), :missing (for not_found), or any integer for individual HTTP return codes.
test_list 测试用例可以声明 :success 响应,但是它应当声明 :redirect (代表 HTTP 重定向)、:missing (代表 not_found),或代表单个 HTTP 返回代码的整数。
Redirects are accomplished using the 301 and 302 status codes. Here's an example of the HTTP headers in a 301 response.
重定向是通过使用301和302状态代码完成。
应用推荐