intTypePromotion=1

Web to py enterprise web framework - p 14

Chia sẻ: Yukogaru Yukogaru | Ngày: | Loại File: PDF | Số trang:10

0
54
lượt xem
4
download

Web to py enterprise web framework - p 14

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

HTTP AND REDIRECT 115 4.11 HTTP and redirect web2py defines only one new exception called HTTP. This exception can be raised anywhere in a model, a controller, or a view with the command: 1 raise HTTP(400, "my message") It causes the control flow to jump away from the user’s code, back to web2py, and return an HTTP response like: 1 2 3 4 5 6 7 8 9 HTTP/1.1 400 BAD REQUEST Date: Sat, 05 Jul 2008 19:36:22 GMT Server: CherryPy/3.1.0beta3 WSGI Server Content-Type: text/html Via: 1.1 127.0.0.1:8000 Connection: close Transfer-Encoding: chunked my message The first argument of HTTP is the HTTP status code. The second argument is the string...

Chủ đề:
Lưu

Nội dung Text: Web to py enterprise web framework - p 14

ADSENSE
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2