詳細查看:http://www.cnblogs.com/tingbogiu/p/5796199.html
關鍵點:
1、返回值類型爲void
2、得到響應字符流
PrintWriter printWriter = response.getWriter();
3、向字節流寫入json字符串
printWriter.print(data);
4、刷新關閉字節流
printWriter.flush();
printWriter.close();
詳細查看:http://www.cnblogs.com/tingbogiu/p/5796199.html
關鍵點:
1、返回值類型爲void
2、得到響應字符流
PrintWriter printWriter = response.getWriter();
3、向字節流寫入json字符串
printWriter.print(data);
4、刷新關閉字節流
printWriter.flush();
printWriter.close();
import requests data = { 'channel': '99x', 'called_number': '135xxx', 'tts_code': 'TTS_xx', 'tts_p