Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1205 Lượt xem

I want to locally override _response method of class JsonRPCDispatcher in http.py.

​class JsonRPCDispatcher(Dispatcher):
​routing_type = 'json'

​def _response(self, result=None, error=None):
​response = {'jsonrpc': '2.0', 'id': self.request_id}
​if error is not None:
​response['error'] = error
​if result is not None:
​response['result'] = result

​return self.request.make_json_response(response)

I want to replace the whole method locally. How to do this?​

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 23
4315
0
thg 4 17
3111
2
thg 8 23
4165
2
thg 7 22
6563
1
thg 3 15
272